O'Reilly logo

Technical Java™: Developing Scientific and Engineering Applications by Grant Palmer

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 10. Interfaces

An interface is another general programming construct provided by the Java language. An interface, in essence, is a named block of code that contains method definitions and constant variable declarations. An interface declares abstract methods that must be implemented by any class that implements the interface. The interface does not implement the methods, it defines the method name, return type, and input parameter list. An interface can also define constants that can be accessed by classes that implement the interface.

In some ways the function of an interface is similar to that of an abstract class. An interface specifies the methods a class must implement, but not how to implement them. A class that implements an interface ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required