Welcome

Java Tutorials


Java 8 static, default methods in Interfaces

    Java version 8 onwards , an Interface can have static and Default methods. Earlier Java versions, once an Interface is published it should not be modified. In the sense, methods should not be deleted ,new methods can not be added or even method parameters should not be modified. In java 8 also same, existing methods should be not altered, but can have new methods decorated with default or static keywords.

These default and static methods can provide implementation at the interface level inself.

ADS