Operator | Description |
---|---|
+ | To add the two values. |
- | To subtract the two values. |
* | To Multiply two values. |
/ | To divide the values. |
% | To give the remainder value. |
++(Increment) | To increment the operand value by 1. |
--(Decrement) | To decrease the operand value by 1 |
Operator | Description |
---|---|
== (equal to) | To check the operand values are equal or not, if the condition is yes then it results true. |
!= (not equal to) | To check the operand values are equal or not, if the values are not equal then it results true. |
> (greater than) | Checks if the value of left operand is greater than the value of right operand, if yes then condition becomes true. |
< (less than) | Checks if the value of left operand is less than the value of right operand, if yes then condition becomes true. |
>= (greater than or equal to) | Checks if the value of left operand is greater than or equal to the value of right operand, if yes then condition becomes true. |
<= (less than or equal to) | Checks if the value of left operand is less than or equal to the value of right operand, if yes then condition becomes true. |
Operator | Description |
---|---|
& | Bitwise AND |
| | Bitwise OR |
^ | Bitwise exclusive OR |
< | left shift |
>> | right shift |
Operator | Description |
---|---|
&& | Logical AND(Example:(a && b) is false) |
|| | Logical OR(Example:(a || b) is true) |
! | Logical NOT(Example:((!a) is false) |
Operator | Description |
---|---|
= | To assign values from right side operands to left side operand. |
+= | To add right operand to the left operand and assign the result to left. |
-= | To subtract right operand from the left operand and assign the result to left operand |
*= | To multiply left operand with the right operand and assign the result to left operand. |
/= | To divide left operand with the right operand and assign the result to left operand. |
%= | To calculate modulus using two operands and assign the result to left operand. |