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 |
What is java autoboxing?
What is the replace tool?
does java support pointers?
What is meant by anonymous class?
What is the purpose of declaring a variable as final?
What is nullpointerexception?
Explain the relationship between the Canvas and Graphics class?
Why are getters and setters used?
Explain JPA in Java.
What is slash r?
Why Static variable required in java?For ex,class A { static int a; int b; } Why static is required?
How many bits are used to represent unicode, ascii, utf-16, and utf-8 characters in java programming?