Browse Tag: default method

Java 8 Default Method Example

Let’s understand why we need default methods which have been added in Java 8. Assume that we have an Interface with some abstract methods  and it has many implementation classes. Now if we want to add new method in the Interface it means we need to change all implementations. Continue Reading

How java 8 default method ambiguity solved

Default methods are introduced in Java 8. The main purpose of default method is to make possible evolving an existing API in compatible way. Interfaces can contain method implementation for which implementing class doesn’t need to provide implementation.

Continue Reading