For boolean types, what you mentioned is how it behaves.
For integer types, it's the bitwise "and" operator.
It can be overloaded for other types.
Basically, the expression (i & 1) == 0
checks to see whether the least significant bit of i
is set, which only happens if the number is odd.