Previous | Next | Trail Map | Learning the Java Language | Table of Contents


More Features of the Java Language

The previous lesson, Objects and Classes in Java, described features of the Java language that every Java programmer needs to know to use objects and write classes in Java. This lesson builds on that, discussing more features of the Java language that help you to organize and design your code.

Managing Inheritance

This section tells you what you need to know to manage inheritance up and down from your classes. First, it describes generally what a subclass gets from its ancestors and specifically what every class gets from the Object class. Second, it discusses how to control whether your class can be subclassed and whether its subclasses can override its methods.

Creating Interfaces

You saw an example of implementing an interface in the previous chapter. You can read more about interfaces--what they are for, why you might need to write an interface, and all about how to write one--in this section.

Implementing Nested Classes

You learned how to use inner classes to implement an adapter in Using an Inner Class to Implement an Adapter in the previous lesson. Inner Classes are one type of nested classes that you will learn about here.

Creating and Using Packages

This section describes how to bundle your classes into packages and how to use classes that are in packages.


Previous | Next | Trail Map | Learning the Java Language | Table of Contents