I am able to compile the above program fine. But, when I tried to run it is throwing a statement saying:
"Execption in thread "main" java.lang.NoClassDefinationFoundError : WTest"
That code worked for me (prints 144) without error. Are you typing "java WTest" or "java wtest"? What you type after java has to match the case of the class in the file (and the filename) exactly. [ August 11, 2007: Message edited by: Red Smith ]