Default Methods in Java 8 and Multiple Inheritance
The main motivation behind default methods is that if at some point we need to add a method to an existing interface, we can add a method without changing the existing implementation classes. In this way, the interface is still compatible with older versions. This is a cool feature. However, we should remember the motivation of using Default Methods and should keep the separation of interface and implementation.
Read full article from Default Methods in Java 8 and Multiple Inheritance
No comments:
Post a Comment