|
|
Meaning of the operators |
Operator example Meaning
= i = 2; assign integer value to a variable
a = "Hello"; assign string to a variable
+ i = 2 + 2 ; i = 4;
+= i += 3; i = i + 3;
-= i -= 3; i = i - 3;
*= i *= 4; i = i * 4;
/= i /= 4; i = i / 4;
%= i % = 2; i = i % 2 ;
|
|
Precedence amongst all
- !,++,--
- *,/,%
- +,-
- <,>,<=,>=
- = =, !=
- &&
- ||
- =, +=,-=,*=,/=,%=
|
|