Java version 8 was released on march 2014 with supports for functional programming, new nashorn javascript engine, stream apis, introducing lambdas, new date time apis and more.
Few of the features are :
- Lambda Expressions − a new language feature allowing treating actions as objects
- Method References − enable defining Lambda Expressions by referring to methods directly using their names
- Optional − special wrapper class used for expressing optionality
- Functional Interface – an interface with maximum one abstract method, implementation can be provided using a Lambda Expression
- Default methods − give us the ability to add full implementations in interfaces besides abstract methods
- 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
Summary
In this article we saw an overview about the Java 8 features. In further articles we will have a detailed look into each feature.
Hope you liked the article !