For Example
a = a + 2;
can be written as :
a += 2;
Syntax :
variable operator = variable / constant / expression
Operators are listed below :
Operators | Example | Meaning |
+= | a+=2 | a=a+2 |
-= | a-=2 | a=a-2 |
*= | a*=2 | a=a*2 |
/= | a/=2 | a=a/2 |
%= | a%=2 | a=a%2 |
&&= | a&&=2 | a=a&&2 |
||= | a||=2 | a=a||2 |
No comments:
Post a Comment