Operators are the special symbols that performs some calculations. The value that the operator operates on is called the operand. For example: a+b. Here, + is the operator that performs addition, a and b are the operands.
1. |
Arithmetic |
+ | Addition |
- | Subtraction |
/ | Division |
* | Multiplication |
% | Modulas |
** | Power |
|
2. |
Comparison/Relational Operators |
> | Greater than |
< | Less than |
>= | Greater than equals to |
<= | Less than equals to |
!= | Not equals to |
== | Equals to |
=== | identity |
|
3. |
Logical Operators |
|
4. |
Assignment Opeartor |
|
5. |
Compound Assignment Operators |
+= | Add and Assignment |
−= | Subtract and Assignment |
*= | Multiply and Assignment |
/= | Divide and Assignment |
%= | Modules and Assignment |
|
6. |
Increment Operators |
a++ | Post Increment |
++a | Pre Increment |
|
7. |
Decrement Operators |
a-- | Post Decrement |
--a | Pre Decrement |
|
8. |
Conditional Operator |
|