Download the JDK
Search the Tutorials
Hide the TOC
Trail: Learning the Java Language
Lesson: Interfaces and Inheritance
Section: Interfaces
Interfaces and Inheritance
Interfaces
Defining an Interface
Implementing an Interface
Using an Interface as a Type
Rewriting Interfaces
Summary of Interfaces
Questions and Exercises
Inheritance
Overriding and Hiding Methods
Hiding Fields
Using the Keyword super
Object as a Superclass
Writing Final Classes and Methods
Abstract Methods and Classes
Summary of Inheritance
Questions and Exercises
Home Page > Learning the Java Language > Interfaces and Inheritance
« Previous • Trail • Next »
Summary of Interfaces

> An interface defines a protocol of communication between two objects.

> An interface declaration contains signatures, but no implementations, for a set of methods, and might also contain constant definitions.

> A class that implements an interface must implement all the methods declared in the interface.

> An interface name can be used anywhere a type can be used.

« Previous • Trail • Next »
Previous page: Rewriting Interfaces
Next page: Questions and Exercises: Interfaces