Sample code discussed in class:

HelloWorld1.java Very Simple Java program - prints "Hello World".

HelloWorld2.java Another simple program - this one uses a non-static method to print a string, so we need to instantiate an object.

ExceptionTest.java A Java program that will throw an exception if you run it without enough command line arguments. Try running "java ExceptionTest blah" to see what the Java interpreter does with an unhandled exception.

ExceptionTest2.java Another sample program for playing with exceptions. This one includes a try/catch so the program can handle the exception itself.

ExceptionTest3.java A different exception - this one shows what happens when you try to access (at run time) a class that doesn't exist. Try running this with and without having ExceptionTest2 compiled.