Class: Class declaration
Class declaration
- Modifiers such as public, private, and a number of others.
- The class name, with the initial letter capitalized by convention.
- The name of the class's parent (superclass), if any, preceded by the keyword extends. A class can only extend (subclass) one parent.
- A comma-separated list of interfaces implemented by the class, if any, preceded by the keyword implements. A class can implement more than one interface.
- The class body, surrounded by braces, {}.
Class MyClass extends MySuperClass implements YourInterface {
// field, constructor, and
// method declarations
}
Semantic portal