Skip to Main Content

New to Java

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!

Any primitive smaller than byte?

843785Jul 15 2008 — edited Dec 31 2008
I have a base10 number that will be no larger than 15 and no smaller than 1, which means I do not need an entire byte to fill this number as it is 4 wasted bits and I need no leading sign bit either. I am curious if there is any primitive smaller than a byte that I could use?

Any help is much appreciated.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 28 2009
Added on Jul 15 2008
82 comments
444 views