Any idea if Java can convert an Integer into an array of boolean as binary?
807603Feb 12 2008 — edited Feb 12 2008I 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...