Similar to how you can define an integer constant in hexadecimal or octal, can I do it in binary?
I admit this is a really easy (and stupid) question. My google searches are coming up empty.
binaryjavasyntax
Similar to how you can define an integer constant in hexadecimal or octal, can I do it in binary?
I admit this is a really easy (and stupid) question. My google searches are coming up empty.
Best Solution
In Java 7:
There are no binary literals in older versions of Java (see other answers for alternatives).