The JavaTM Tutorial

| Start of Tutorial > Start of Trail | Search Feedback Form

Trail: Learning the Java Language

## Lesson: Classes, Interfaces, and Packages

> In the lesson entitled Object-Oriented Programming Concepts you read about the concepts behind object-oriented programming. Now it's time to get to work and put those concepts to practical use in Java.

### Creating Classes

> This section provides a complete description of a larger class, `Stack`, and describes all of the components of a class that provide for the life cycle of an object created from it. It talks first about constructors, then about member variables and methods.

### 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

> The Java programming language lets you define a class, called a nested class, within another class. Inner Classes are a special type of nested class.

### Creating and Using Packages

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

| Start of Tutorial > Start of Trail | Search Feedback Form