concept class declaration in category java

This is an excerpt from Manning's book Java SE 11 Programmer I Certification Guide MEAP V03.
The package statement can’t appear within a class declaration or after the class declaration. The following code will fail to compile:
Figure 3.4 Components of a class declaration
![]()
Table 3.1 summarizes the compulsory and optional components.
Table 3.1 Components of a class declaration
Mandatory
Optional
Keyword class
Access modifier, such as public
Name of the class
Nonaccess modifier, such as final
Class body, marked by the opening and closing curly braces, {}
Keyword extends together with the name of the base class
Keyword implements together with the names of the interfaces being implemented
Class declarations and class definitions are components of a Java class.

This is an excerpt from Manning's book OCA Java SE 8 Programmer I Certification Guide.
Comments can contain any special characters (including characters from the Unicode charset).
The package statement can’t appear within a class declaration or after the class declaration. The following code will fail to compile:
The components of the preceding class declaration can be illustrated as shown in figure 1.5.
Figure 1.5. Components of a class declaration
![]()
Table 1.1 summarizes the compulsory and optional components.