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!

Any idea if Java can convert an Integer into an array of boolean as binary?

807603Feb 12 2008 — edited Feb 12 2008
I could write it myself, but It occurred to me, can BlueJ do this with a class library already?

I'm starting with an int. I want to convert it into an array or a arrayList of boolean values that will reprenent the binary of the value. For example:

0 = 0
1 = 1
2 = 1, 0
3 = 1, 1
4 = 1, 0, 0
5 = 1, 0, 1 (true, false, true)

etc...
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 11 2008
Added on Feb 12 2008
2 comments
198 views