New features added in Java 8

Java 8 comes with several new features a few of them are:

  • Lambda Expressions 

    Lambda expressions are similar to methods, but they do not need a name and they can be implemented right in the body of a method. - more details
  • Method References

     Enable defining Lambda Expressions by referring to methods directly using their names (It can be understood as a shorthand of Lambda Expression) - more details
  • Optional

     Special wrapper class used for expressing optionality.
  • Functional Interface

    An interface with a maximum of one abstract method, implementation can be provided using a Lambda Expression. - more details
  • Default methods

     The default method gives us the ability to add full implementations in interfaces besides abstract methods. - more details
  • Nashorn, JavaScript Engine

    Java-based engine for executing and evaluating JavaScript code.
  • Stream API

    A special iterator class that allows processing collections of objects in a functional manner.
  • Date API

     an improved, immutable JodaTime-inspired Date API.

Along with these new features, lots of feature enhancements are done under the hood, at both the compiler and JVM level.