java basics @ mlab, 15-19 Nov 1999, juhuu@katastro.fi
variables? char one character in a string boolean true or false integral / integer byte short int long byte, from -128 to 127 short, from -32768 to 32767 int, from -2147483648 to 2147483647 long, from -9223372036854775808 to 9223372036854775807 floating point / decimal numbers float double most commonly used: char, boolean, int, double
objects? java is an object oriented language. the definitions of objects and their methods (functions) are called classes. a representative of a class is called an instance. class2 public method1 public method2 class1 private method1 private method2 public method1 public method2 class3 private method1 private method2 public method1 public method2
some very useful java classes: ( you can find information about these and others from jdk 1.02 API documentation ) java.lang.Math Math class, mathematical functions java.lang.String String class, string manipulation functions java.util.Random Random class, random number generator java.util.Vector Vector class, array that can grow and shrink dynamically java.awt.Graphics Graphics class java.awt.Color Color class java.applet.Applet Applet class