7. Assignment

Created Friday 20 March 2015

http://chortle.ccsu.edu/java5/Notes/chap09A/ch09_5.html

dataType variableNameOne = initialValueOne,
variableNameTwo = initialValueTwo ;

Concatenation operator: '+'

+
addition
+=
x += 5; or x = x + 5;
-
subtraction
-
=
x
-
= 5; or x = x
-
5;
*
multiplication
*=
x *=
5; or x = x * 5;
/
division
/=
x /= 5; or x = x / 5;
%
remainder
%=
x %= 5; or x = x % 5;
<<
shift left
<<=
z <<= 5; or z = z << 5;
>>
shift right
>>=
z >>= 5; or z = z >> 5;
&
and
&=
y &= 5; or y = y & 5;
^
xor
^=
y ^= 5; or y = y ^ 5
;
|
or
|=
y |= 5; or y = y | 5;



Backlinks: