classes

 

You cannot have more than one public class per file.

 

The only five allowable class keywords are:public, abstract, final, extends, and implements.

 

Classes cannot be protected, private, native, synchronized, or final and abstract together. (But inner classes can be private.)

 

A class must be made abstract if it contains just one or more abstract methods.

 

Classes can be made abstract any time you wish Ė even when not necessary due to Java rules.

 

Classes that are abstract can contain non-abstract methods.

 

A class statement, along with an interface and a constructor, are the only three Java statements that can appear with absolutely no modifiers.

Methods canít do so, as they need a return type or void.

Variables can't, as they need a type.

 

Note that you don't need a class statement to get a good compile.The JVM will compile a completely empty source file without error.