Here's how I did:
1. Copied your code into a file named Test12.java
2. After compiling, 4 files: Test12.class, Foo.class, Test12$1.class and Test12$2.class were generated.
3. c:\>
java Test12
However, I could able to reproduce your problem by creating a separate Foo.java that looks like this:
Compile this Foo.java after step 2 such that it overrides the existing one Foo.class. Then run java Test12. I got the following runtime error:
[ February 22, 2005: Message edited by: Joyce Lee ]