4.2. Defining Classes
A class declaration introduces a new reference type. It has the following general syntax:
<class modifiers> class <class name> <extends clause> <implements clause> // Class header{ // Class body <field declarations> <method declarations> <nested class declarations> <nested interface declarations> <constructor declarations> <initializer blocks>}
In the class header, the name of the class is preceded by the keyword class. In addition, the class header can specify the following information:
scope or accessibility modifier (see Section 4.7, p. 131)
additional class modifiers (see Section 4.8, p. 134)
any class it extends (see Section 6.1, p. 226)
any interfaces it implements (see Section 6.4 ...
Get Programmer's Guide to Java™ Certification, A: A Comprehensive Primer, Second Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.