Java 8 is the latest major release from Oracle for Java with loads of improvements and programming language changes. One of the ground breaking improvement in Java 8 is the use of lambda expressions and representing a shift in how developers approach the language. JDK 8 features Project Lambda support allowing for functional programming capabilitie

Java 8 Features Summary

  1. Lambda Expression
  2. Virtual Extension Methods
  3. Nashorn JavaScript Engine
  4. Remove Perm gen
  5. Date & Time API
  6. JDBC 4.2
  7. Type Annotations
  8. Compact Profiles Support
  9. Stream API

What is Lambda Expression?

A lambda expression is a anonymous method with more compact syntax that also allows the omission of modifiers, return type, and in some cases parameter types as well. Before lambda expressions, the anonymous methods are written inside the anonymous classes which are many lines of compare to the single line lambda expression.

What is Functional Interface?

An interface which has only one abstract method is known as the functional interfaces. Functional interface can have any number of non-abstract methods, but only one abstract method must be present. @FunctionalInterface annotation used for writing the functional interfaces. However, this annotation is not mandatory.

What is Predicate?

Predicate is a functional interface introduced as part of the Java 8 version under the package java.util.function. Predicate is used for assigning a lambda expression and returns boolean value as the result.

Follow page
Message Krishna Srinivasan
Report link