The Assignment Operator
An Introduction with Examples in Java |
Prof. David Bernstein
|
Computer Science Department |
bernstdh@jmu.edu |
;
character;
, wherever it is,
even on another line)#
is an
in-line comment//
is an
in-line comments and everything between a /*
and
a */
is a block comment=
age = 21
initial = 'H'
ok = false
course = "CS159"
age = 21;
initial = 'H';
ok = false;
course = "CS159";
21 = age
(which has an inappropriate left-side operand)i = j = 5
is equivalent to
i = (j = 5)
final
Modifier in Java (cont.)final
is the left-side
operand of more than one assignment operator