We are getting to know about Java's basics.
Java has the bitwise operators. (which all other advanced programming language do either)
There are several operands of them.
Bitwise operators
which is never used.
Java has the bitwise operators. (which all other advanced programming language do either)
There are several operands of them.
Bitwise operators
- & opreator
- Performs an and calculation between data bits
- ^ opreator
- Performs an or calculation between data bits
- | opreator
- Performs a xor calculation between data bits
- ~ operator
- Inverts all data bits
- << operator
- Shifts the bit pattern to the left
- >> operator
- Shifts the bit pattern to the right
- >>> operator
- Shifts the zero to the leftmost position
Even the Java Documentation says these are "less commonly used".
So just make sure you 'heard' of these exists.
Check out more about these operators here: Official Java Documentation