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

What is volatile data type?

0 Answers  


How to reverse a string in java?

0 Answers  


Explain Linked HashSet

1 Answers  


What is reflexive association?

1 Answers   Infogain,


Difference between String & StringBuffer

16 Answers   IBM, Infosys, Tech Mahindra, Wipro,






how can i connect to database in a applet ?

1 Answers  


Can we use this () and super () in a method?

0 Answers  


How does indexof work?

0 Answers  


What is initial size of arraylist in java?

0 Answers  


How do you sort arraylist in descending order?

0 Answers  


What is nested interface?

0 Answers  


What is the association?

0 Answers  


Categories