In this article, we will discuss new features in Java 8 version
Following are the features which came in Java 8 version.
- Lambda expression: Lambda expression is an anonymous function. In other words, Lambda expression is a block of code which takes some input parameter and return values.
- default and static method in the interface: default and static methods came in the interface.
- functional interface: Functional interface should contain only one abstract method and it may contain multiple default and static methods. It's used to invoke a lambda expression.
- Stream API
- Date and Time API
- Double colon (::) for method reference and constructor reference
- Optional class
No comments:
Post a Comment