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
1.4m articles
1.4m replys
5 comments
56.9k users