Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Byte size of primitive type

806067May 30 2011 — edited May 31 2011
Hi All,

How can I find the byte size of primitive types? In c , there is sizeOf(int). I found Integer.SIZE in java, but it return bits, so can I simply divide bit result to 8, then get the result? What about if bits are not multiple of 8?

Thanks!
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 28 2011
Added on May 30 2011
11 comments
282 views