Basic HTML version of Foils prepared Feb 19 1999

Foil 5 Assignment

From Computing and Java Language Basics NPAC Java Academy February--April 99 -- Feb 13 1999. by Nancy McCracken


1 The way that you put a value into the space named by the variable is called assignment:
2 Note that this is not the same as "=" in math. You can say things like: which means take the old value of x, add 1, and store it back into x. In fact this is such a common operation, there is an abbreviation:
3 int x, y;
4 x = 8;
5 y = 2 * x;
6 Take the value on the right of
7 the "=" and store it into the place
8 named on the left.
9 x = x + 1;
10 x++;

in Table To:


© Northeast Parallel Architectures Center, Syracuse University, npac@npac.syr.edu

If you have any comments about this server, send e-mail to webmaster@npac.syr.edu.

Page produced by wwwfoil on Mon Jul 5 1999