Java Lambda Expressions
Lambda expression is a new and important feature of Java 8. It provides a way to represent one method interface using an expression.
This expression will help to iterate, filter and extract data from collection.
The Lambda expression provides an implementation of an interface which has functional interface. It saves a lot of code. When we use lambda expression, we don't need to define the method again for providing the implementation. We just need to write the implementation code.
.class file is not created for lambda Expression as compiler treat this as function.
Functional Interface
Lambda expression provides implementation of functional interface. An interface which has only one abstract method is called functional interface. Java provides an anotation @FunctionalInterface, which is used to declare an interface as functional interface.
Lambda expression is a new and important feature of Java 8. It provides a way to represent one method interface using an expression.
This expression will help to iterate, filter and extract data from collection.
The Lambda expression provides an implementation of an interface which has functional interface. It saves a lot of code. When we use lambda expression, we don't need to define the method again for providing the implementation. We just need to write the implementation code.
.class file is not created for lambda Expression as compiler treat this as function.
Functional Interface
Lambda expression provides implementation of functional interface. An interface which has only one abstract method is called functional interface. Java provides an anotation @FunctionalInterface, which is used to declare an interface as functional interface.
Comments
Post a Comment