Last active
June 1, 2016 11:33
-
-
Save sushanthmangalore/e0b60b1856f0d68767dfe3763f62f3c7 to your computer and use it in GitHub Desktop.
Abstract Classes vs Java 8 interfaces with default method implementations
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Java 8 default method implementations in interfaces do not make abstract classes obsolete. Abstract classes are still needed where private state needs to be maintained. Interfaces with default method implementations are thus useful for representing types that are mostly stateless and provide default implementations for utility methods that can be used by classes that implement these interfaces but do not want to override the default implementation. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment