Arithmetic Operators
+ (Addition)
- (Subtraction)
* (Multiplication)
/ (Division)
% (Modulus)
++ (Increment)
-- (Decrement)
- (Subtraction)
* (Multiplication)
/ (Division)
% (Modulus)
++ (Increment)
-- (Decrement)
Note − Addition operator (+) works for Numeric as well as Strings. e.g. "a" + 10 will give "a10".
Comparison Operators
= = (Equal)
!= (Not Equal)
> (Greater than)
< (Less than)
>= (Greater than or Equal to)
<= (Less than or Equal to)
Logical Operators
&& (Logical AND)
|| (Logical OR)
! (Logical NOT)
Bitwise Operators
& (Bitwise AND)
| (BitWise OR)
^ (Bitwise XOR)
~ (Bitwise Not)
<< (Left Shift)
>> (Right Shift)
>>> (Right shift with Zero)
Assignment Operators
= (Simple Assignment )
+= (Add and Assignment)
−= (Subtract and Assignment)
*= (Multiply and Assignment)
/= (Divide and Assignment)
%= (Modules and Assignment)
Note − Same logic applies to Bitwise operators so they will become like <<=, >>=, >>=, &=, |= and ^=
Conditional Operator
? : (Conditional )
If Condition is true? Then value X : Otherwise value Y
Comments
Post a Comment