Module 35
Interfaces
Interfaces, lists of methods that a class promises to have. implements and @Override, several classes behind one interface and one class with several interfaces, interfaces as the types of variables, parameters, return values and list elements, and Java's own List, Map, Set and Collection interfaces, with HashSet for values kept once. Last, when to choose an interface and when an abstract class. MOOC section 9.2.
Steps
- An interface: a promise of methods
- Many classes, many interfaces
- An interface as a variable's type
- An interface as a parameter's type
- Lists of an interface, and interfaces as return types
- Java's List interface
- Java's Map interface
- Java's Set interface and HashSet
- Collection, and choosing between an interface and an abstract class