Thursday, July 8, 2021

New Features in Java 8

 In this  article, we will discuss new features in Java 8 version




Following are the features which came in Java 8 version.

  1. 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.
  2. default and static method in the interface: default and static methods came in the interface.
  3. 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.
  4. Stream API
  5. Date and Time API
  6. Double colon (::) for method reference and constructor reference
  7. Optional class

No comments:

Post a Comment

What is Lambda expression and it's used ?

  In this article, we will discuss the most important features in Java 8 Lambda expression. First, We will discuss Lambda expression and the...