Re engineering an existing JDK framework is always very complex.
one interface in JDK framework breaks all classes that extends the interface which means that adding any new method could break millions of lines of code. Therefore, default methods have introduced as a mechanism to extending interfaces in a backward compatible way.
Default methods can be provided to an interface without affecting implementing classes as it includes an implementation. If each added method in an interface defined with implementation then no implementing class is affected. An implementing class can override the default implementation provided by the interface.
For Java 8, the JDK collections have been extended and forEach method is added to the entire collection.
Auf dieser Seite können Sie das Online-Video Why default Method in Interface from Java8 mit der Dauer stunde minuten sekunde in guter Qualität ansehen, das der Benutzer Automation Testing By Experts 02 Mai 2018 hochgeladen hat, den Link mit Freunden und Bekannten teilen, dieses Video wurde auf Youtube bereits 428 Mal angesehen und es wurde von 13 den Zuschauern gefallen. Viel Spaß beim Betrachtenden Zuschauern gefallen!