Basic HTML version of Foils prepared October 30 1999

Foil 4 Assignment

From Short Introduction to Kids on Basic Programming Concepts in Java Sonia Kovalesky festival workshop (High School Girls) -- October 23 1999. by Nancy McCracken


The way that you put a value into the space named by the variable is called assignment:
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.
int x, y;
x = 8;
y = 2 * x;
Take the value on the right of
the "=" and store it into the place
named on the left.
x = x + 1;



© 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 Sat Oct 30 1999