Hi Timothy,
A
top-level class can only be declared with the
public access modifier or no access modifier (default access).
A
static nested class or an
inner class can be declared
private, protected or public or have no access modiifer.
The following compiles without error:
A private class can have a public variable but the variable will not be visible outside the class as it's access is subordinate to the class access.
For your examples,
One.java - won't compile. A top-level class can only be public or have no access modifier.
Two.java - will compile without a problem. An inner class can be private
Three.java - won't compile. You've declared three top-level classes. Only <code>public class Three</code> is a legal declaration.
The easiest way to check for such things is to compile them yourself
------------------
Jane Griscti
Sun Certified Programmer for the Java� 2 Platform