New Feature of Java 1.8

Want to share some new features of Java 1.8. It’s high time to look into these features.

 One of the new feature of Java 1.8 is from Java 8, interfaces are enhanced to have method with implementation. We can use default and static keyword to create interfaces with method implementation. 

We know that Java doesn’t provide multiple inheritance in  Classes because it leads to Diamond Problem. So how it will be handled with interfaces now, since interfaces are now similar to abstract classes. The solution is that compiler will throw exception in this scenario and we will have to provide implementation logic in the class implementing the interfaces.

I will discuss with examples for a better understanding in my next post.