Difference between & and && in Java? [duplicate]

& is bitwise.
&& is logical.

& evaluates both sides of the operation.
&& evaluates the left side of the operation, if it’s true, it continues and evaluates the right side.

Leave a Comment