8.2. Class Members

The members of a class type are all of the following:

• Members inherited from its direct superclass (§8.1.4), except in class Object, which has no direct superclass

• Members inherited from any direct superinterfaces (§8.1.5)

• Members declared in the body of the class (§8.1.6)

Members of a class that are declared private are not inherited by subclasses of that class.

Only members of a class that are declared protected or public are inherited by subclasses declared in a package other than the one in which the class is declared.

Constructors, static initializers, and instance initializers are not members and therefore are not inherited.

We use the phrase the type of a member to denote:

• For a field, its type.

• For a method, ...

Get The Java® Language Specification, Java SE 7 Edition, Fourth 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.