O'Reilly logo

Programmer's Guide to Java™ Certification, A: A Comprehensive Primer, Second Edition by Rolf W. Rasmussen, Khalid A. Mughal

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

7.2. Static Member Classes and Interfaces

Declaring and Using Static Member Classes and Interfaces

A static member class or a static member interface comprises the same declarations as those allowed in an ordinary top-level class or interface. A static member class must be declared as a static member of an enclosing class or interface. Nested interfaces are considered implicitly static, the keyword static can, therefore, be omitted. Since static member classes and interfaces are members of an enclosing class or interface, they can have any member accessibility.

Static member classes and interfaces can only be nested within other static member or top-level classes and interfaces.

In Example 7.2, the top-level class TopLevelClass at (1) contains ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required