educative.io

Educative

How do we achieve 100% abstraction with interfaces in Java8?

How do we achieve 100% abstraction with interfaces in Java8 if it allows for default methods which has concrete implementation just like the non-abstract methods in Abstract class?

Hello @Yamuna_perumalsamy

The user is aware only about the classes that implement any particular interface and the methods. It should be noted that the information regarding implementation is completely hidden from the user. Hence, 100% abstraction is achieved.

Hope this answers your query!