Features of Java8 explained

Hi all time is passing so fast that Oracle has published its road map for “Java 9”, now in this post let me explain the best features that are available in Java 8.
Java 8 allow us to write a non abstract methods inside the interface by utilizing the keyword “default” below is the code snippet.

Functional Interfaces:
An interface with only one abstract method is called functional interface. Java 8 provides us with an annotation called @FunctionalInterface to make any interface as functional interface, also in java 8 we can pass Method and Constructor references to functional interfaces below are the code snippets which demonstrate this concept.