Chapter 5
Mastering Advanced Language Features, Part 1
In Chapters 2 through 4, I laid a foundation for learning the Java language. In Chapter 5, I will add to this foundation by introducing you to some of Java’s more advanced language features, specifically those features related to nested types, packages, static imports, and exceptions. Additional advanced language features are covered in Chapter 6.
Mastering Nested Types
Classes that are declared outside of any class are known as top-level classes. Java also supports nested classes, which are classes that are 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 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access