Skip to content

Instantly share code, notes, and snippets.

@sushanthmangalore
Last active June 1, 2016 11:33
Show Gist options
  • Save sushanthmangalore/e0b60b1856f0d68767dfe3763f62f3c7 to your computer and use it in GitHub Desktop.
Save sushanthmangalore/e0b60b1856f0d68767dfe3763f62f3c7 to your computer and use it in GitHub Desktop.
Abstract Classes vs Java 8 interfaces with default method implementations
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