Sizeof method does not exists in java.I just wanna know if we can find the size of integer or float by means of any program??.I think integer occupies four bytes.How can one show it like we do in c++ using sizeof method ????
5/5/2017 5:45:38 PM
Afaik you don't need the sizeof stuff, because Java uses constant sizes (32-/64-bit).
Yes I know in java they are constant.
Just wanna know if there is a way to prove int has four bytes by means of a program.
Thanks a lot for helping me out.
I really don't want to memorize these size of primitive data types.
Send us a message