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 |
Can we use different return types for methods when overridden?
What is skeleton and stub? What is the purpose of those?
Why is singleton instance static?
How many threads does a core java have?
Can an interface be final?
Which api is provided by java for operations on set of objects?
Can you access the private method from outside the class?
What are the differences between heap and stack memory?
What is queue in java?
What about main() method in java ?
Difference between error and exception
How do you reverse a list?