A class declaration looks like the following. Elements in square brackets [] are optional.

 [ClassModifiers] class ClassName [Inheritances] {            ClassBody        } 

ClassModifiers are any combination of the following keywords, in this order:

 public abstract final 

Inheritances are any combination of the following phrases, in this order:

 extends SuperClass        implements Interfaces 

SuperClass is the name of a superclass. Interfaces is the name of an interface, or a comma-separated list of interfaces. If more than one interface is given, then they should be sorted in lexical order.

A class declaration always starts in column 1. All of the above elements of the class declaration up to and including the opening brace { should appear on a single line (unless it is necessary to break it up into continuation lines if it exceeds the allowable line length). The ClassBody is indented by the standard indentation of four spaces. The closing brace } appears on its own line in column 1. There should not be a semicolon following the closing brace. If the class declaration has one or more continuation lines, then a single blank line should immediately follow the opening brace .

Software Development. Building Reliable Systems
Software Development: Building Reliable Systems
ISBN: 0130812463
EAN: 2147483647
Year: 1998
Pages: 193
Authors: Marc Hamilton © 2008-2017.
If you may any questions please contact us: