Basic HTML version of Foils prepared Feb 19 1999

Foil 4 Variables and Types

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


1 A variable is a name that you give to a place to store a value in memory. When you declare a variable name, you say what type the values will be.
2 Declare 3 variables of type integer: There are many other types:
3 int x;
4 int y;
5 int size;
6 Or all at once for variables
7 of the same type:
8 int x, y, size;
9 String s;
10 Font f;
11 Color c;

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