Basic HTML version of Foils prepared October 30 1999

Foil 5 Arithmetic

From Short Introduction to Kids on Basic Programming Concepts in Java Sonia Kovalesky festival workshop (High School Girls) -- October 23 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 Sat Oct 30 1999