C H A P T E R  3

Exploring Advanced Language Features

Chapters 1 and 2 introduced you to Java's fundamental language features along with its support for classes and objects. Chapter 3 builds onto this foundation by introducing you to Java's advanced language features, specifically those features related to nested types, packages, static imports, exceptions, assertions, annotations, generics, and enums.

Nested Types

Classes that are declared outside of any class are known as top-level classes. Java also supports nested classes, which are classes declared as members of other classes or scopes. Nested classes help you implement top-level class architecture.

There are four kinds of nested classes: static member classes, nonstatic member classes, ...

Get Beginning Java 7 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.