Top
Previous Next
The Java Language CS 161 - Java

Assignment Operators

And shortcut assignment operators (Side effect operators)

d = ed is assigned the value of e
d += ed is assigned the value of d + e
d -= ed is assigned the value of d - e
d *= ed is assigned the value of d * e
d /= ed is assigned the value of d / e
d %= ed is assigned the value of d % e

 

 

 

 
For completeness... 
d &= ed is assigned the value of d & e
d |= ed is assigned the value of d | e
d ^= ed is assigned the value of d ^ e
d <<= ed is assigned the value of d << e
d >>= ed is assigned the value of d >> e
d >>>= ed is assigned the value of d >>> e


Top
Previous Next
jwd