News

The former method is executed by default methods a() and b(), and the latter method is executed by static method d(). Compile Listing 21 (javac PMDemo.java) and run the application (java PMDemo).
The default method role offered by interfaces has given new life to the Java Collections Framework. You might consider this role for your own legacy interface-based libraries.