Did you run the code as:
java ClassName
Or
java ClassName.class
The first form is the correct form. If you append .class it will not find your
class. Perhaps you can give some more
details if this is not the case. Stack traces, the command you used to execute
your code, etc. is always helpful.