Possible Duplicate:
In Java, can I define an integer constant in binary format?
In python, you can do something like:
a = 0b00000010 which would set a to 2.
Is it possible to do something like that in Java? I know I could just go through and assign my varibles by the number instead of binary, but I like the visual.
Thanks ~Aedon
In Java 7, you can do
However if you’re working with an older version, I’m afraid you’re stuck with