Interfaces
Like abstract classes, but cannot have executable statements
- Define a set of operations that make sense in several classes
- Abstract Data Types
A class can implement any number of interfaces
- It must have concrete methods for the operations
You can declare the type of a variable to be an interface
- This is just like declaring the type to be an abstract class
Important interfaces in Java’s library include
- Runnable, Collection, Iterator, Comparable, Cloneable