October 2018
Intermediate to advanced
592 pages
19h 49m
English
This chapter covers
Traditionally, a Java interface groups related methods together into a contract. Any (nonabstract) class that implements an interface must provide an implementation for each method defined by the interface or inherit the implementation from a superclass. But this requirement causes a problem when library designers need to update an interface to add a new method. Indeed, existing concrete classes (which may not be under the interface designers’ control) need to be modified to reflect the new interface contract. This situation is particularly problematic because the Java 8 API introduces ...