Class Declarations


To declare a new class in Java, the following syntax is used:
[<modifier> ...] class <class name;> [extends <super class>] [...]
{
    ...
}
The <modifier> list is optional, and may contain:
   public      abstract    final

The new class may optionally extend an existing one, in which case it will inherit attributes and methods from that class.

There are one or two additions to a class declaration that will be covered later on.