In this Java source code I have this line:
if ((modifiers & ~KeyEvent.SHIFT_MASK) != 0) ....
What does the tilde ~
mean?
The Tilde (~
) performs a bitwise complement of a numerical value in Java.
See: Bitwise complement (~
): inverts ones and zeroes in a number