2009-01-12, 08:13 PM
Java does support bitwise operators.
As for the statement (n & 1 == 1), that should work fine in Java (or any other languages too IMO) due to the order of operations, ie & has precedent over ==. This should be in the basic syntax of a programming language. This order of precedent is the same as how multiply gets executed before addition.
As for the statement (n & 1 == 1), that should work fine in Java (or any other languages too IMO) due to the order of operations, ie & has precedent over ==. This should be in the basic syntax of a programming language. This order of precedent is the same as how multiply gets executed before addition.

