Operators Flashcards
prefix increment (++i)
i is incremented by 1 and then assigned to a value
postfix increment (i++)
i is assigned to a value and then incremented by 1
prefix decrement (–i)
i is decremented by 1 and then assigned to a value
postfix decrement (i–)
i is assigned to value and then decremented by 1
addition assignment (a += b)
a = a + b
subtraction assignment (a -= b)
a = a - b
multiplication assignment (a *= b)
a = a * b
division assignment (a /= b)
a = a / b
modulo assignment (a %= b)
a = a % b
bitwise AND assignment (a &= b)
a = a & b
bitwise OR assignment (a |= b)
a = a | b
bitwise XOR assignment (a ^= b)
a = a ^ b
bitwise left shift assignment (a
a = a
bitwise right shift assignment ( a»_space;= b)
a = a»_space; b
Java ternary conditional
result = testCondition ? value1 : value2