Basic HTML version of Foils prepared Feb 19 1999

Foil 6 Arithmetic

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


On the previous page, we had an example:
Note that we can use numbers like 8 and arithmetic operators +, - , * and / just the same as in math (except that numbers can't get too big)
Strings are sequences of characters in quotes:
Values of other types are created with methods.
int x, y;
x = 8;
y = 2 * x;
String s;
s = "This is a string."



© 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