Skip to main content
#10 Shortcut Operators For JAVA
The following table shows all the available shortcut operators:
| Operators |
Description |
Example |
Meaning |
| ++ |
increment |
a++ |
a=a+1 |
| -- |
decrement |
a-- |
a=a-1 |
| += |
add and assign |
a+=2 |
a=a+2 |
| -= |
subtract and assign |
a-=2 |
a=a-2 |
| /= |
divide and assign |
a/=2 |
a=a/2 |
| *= |
multiply and assign |
a*=2 |
a=a*2 |
Comments
Post a Comment