How will you measure that int takes up only 32 bits in memory?

Answers were Sorted based on User's Feedback



How will you measure that int takes up only 32 bits in memory?..

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

How will you measure that int takes up only 32 bits in memory?..

Answer / sachin tyagi

by using random function which never generate value more
than 32 bits.

Is This Answer Correct ?    0 Yes 3 No

Post New Answer

More Core Java Interview Questions

How the threads are synchronized?

2 Answers   BMC, CTS,


How the elements are organized in CardLayout?

5 Answers  


What are examples of modifiers?

0 Answers  


we have two threads..both the threads are reading the data.. is there any need of synchronization there?...justify it?

4 Answers   IBM,


how many ways to create Thread and which one is good? runnable interface ot Thread class?

3 Answers   Satyam,






What is a boolean in java?

0 Answers  


Hi Friends, I am new to java. Can u explain about thread concept.How i know one thread is locked, and how can i force or acquire another thread for lock . Finally how to know thread is released from lock. Explain types of lock(like method level and block level) in thread.

1 Answers  


What is a platform?

0 Answers  


Explain java coding standards for interfaces?

0 Answers  


Describe the term diamond problem.

0 Answers  


What is navigable map in java?

0 Answers  


Is a copy constructor?

0 Answers  


Categories