As we are aware that till JDK 7 we couldn't include implemented method inside an interface. In other words, there was no provision to have a method body inside a method of an Interface. But for those who are reading Default Methods for the first time it will be very surprising. The surprise is that we can now include an implemented method inside an Interface. Therefore, we can also have an implemented method inside an interface. Here, we are talking about default method in interface. The most use of default method in interface is to provide additional functionality to a given type without breaking down the implementing classes. In this article, we are going to take a deeper look on default
You are here
Home > Posts tagged "default methods in java 8"