Arithmetic Operators:
+ - adds the left and right operands.
- - subtracts the right operand from the left.
* - multiplies the operands.
/ - divides the left operand by the right.
% - returns the remainder of the left operand divided by the right.
++i - increments operand i by one before the current expression is evaluated.
--i - decrements the operand i by one before the current expression is evaluated.
i++ - increments the operand by one after the current expression is evaluated.
i-- - decrements the operand by one after the current expression is evaluated.
-i - reverses the sign of the operand.
Bitwise Operators:
& - bitwise AND, returns a one in each bit position if bits of both operands are ones.
| - bitwise OR, returns a one in a bit if bits of either operand is one.
^ - bitwise XOR, returns a one in a bit position if bits of one but not both operands are one.
~ - bitwise NOT, flips the bits of its operand. arg = ~a
<< - left shift, shifts a in binary representation b bits to left, shifting in zeros from the right.
>> - sign-propagating right shift, shifts a in binary representation b bits to right, discarding bits shifted off.
>>> - zero-fill right shift, shifts a in binary representation b bits to the right, discarding bits shifted off, and shifting in zeros from the left.
Assignment Operators:
i = j - assigns the value of j to i.
i += j - assigns the value of i + j to i.
i -= j - assigns the value of i - j to i.
i *= j - assigns the value of i * j to i.
i /= j - assigns the value of i / j to i.
i %= j - assigns the value of i % j to i.
i &= j - assigns the value of i & j to i.
i ^= j - assigns the value of i ^ j to i.
i |= j - assigns the value of i | j to i.
i <<= j - assigns the value of i << j to i.
i >>= j - assigns the value of i >> j to i.
i >>>=j - assigns the value of i >>>j to i.
Comparison Operators:
== - returns true if operands are equal.
!= - returns true if operands are not equal.
> - returns true if left is greater than right.
>= - returns true if left is greater than or equal to right.
< - returns true if right is greater than left.
<= - returns true if right is greater than or equal to left.
Logical Operators:
&& - true if operands are true ('and').
|| - true if either operand is true ('or').
! - true if single operand is false ('not').