class One { public static void main(String[] args) { int n; n = 3; Two m; m = new Two() } } class Two { } Languages: Perl, Python, PHP, Javascript Literals, operators, expressions, values, variables, assignment statement, if statements (branches), loops (while, for), procedures (subroutines, functions, methods). Java programs are made of classes. You write your classes in files with .java extension. To run a program you compile the file, and run the class. a) to compile you use javac This is located in c:\program files\java\jdk1.6.0_04\bin Set the PATH then run javac One.java from the command line. This generates one or more classes depending on the contents of the file. For example if the file One.java includes definitions for three classes One, Nine and Twenty the compilation will create One.class, Nine.class and Twenty.class b) to run you need to invoke java on one of the classes that has a main method. class One { public static void main(String[] args) { } } What is a class? A class is a container. It can contain: variables and methods. We call them members. So variables and methods can be class members. Does this definition of a class have anything inside it: class One { } Is this class empty? No. Every class has a blueprint inside. The blueprint can be used to create objects of that type. If the blueprint is empty the objects will be empty too. Every class has a blueprint inside it (even if it's empty). If it's empty you can see it. Why can't I see it? Because the blueprint is implicitly defined. Examples follow. Every class has a blueprint. Think of the blueprint as a cookie cutter. If you have memory (dough) you can get cookies. This class class One { } has a blueprint inside, empty as it may be. But we can use it to create objects of this type (One).