How will you measure that int takes up only 32 bits in memory?
Answers were Sorted based on User's Feedback
Answer / umesh naik
System.out.println(Integer.SIZE);
it will print 32
System.out.println("Float.SIZE "+Float.SIZE);
it will print 32
System.out.println("Long.SIZE "+Long.SIZE);
it will print 64
Is This Answer Correct ? | 0 Yes | 0 No |
Answer / sachin tyagi
by using random function which never generate value more
than 32 bits.
Is This Answer Correct ? | 0 Yes | 3 No |
Which variables are stored in heap?
Java Compiler is stored in JDK, JRE or JVM?
Where is stringbuffer stored?
for(i=0;i<100;i++) { int i=method();//method returns no's from 1 to 10; /* insert some stmts which can give output like no.of times numbers(1-10) returned. (for example if it returns 2 then i want output how many times 2 returned) like that i want output for no's 1 - 10 how many times each no returned. */ }
Why runnable interface is used in java?
What is lossy conversion in java?
Why does java not support pointers?
Can I declare a class as private?
Why all programming languages have main as a execution starting point?
What is a stringbuilder?
What is the difference between abstraction and encapsulation?
How many statements can be created with one connection in jdbc?