0 votes
in JAVA by
What are new features were added in Java 8?

1 Answer

0 votes
by

In Java 8,  the following new features were added:

Lambda Expressions − lambda expression is a function that can be referenced and passed around as an object

Method References − Method references are the references that use a function as a parameter to request a method.

Optional − This class is to provide a type-level solution for representing optional values instead of using null references.

Functional Interface – An Interface that contains exactly one abstract method and implementation can be provided using a Lambda Expression

Default methods − give us the ability to add full implementations in interfaces besides abstract methods

Stream API − Stream API provides a functional approach to processing collections of objects.

Date and Time API − an improved, immutable JodaTime-inspired Date API

Nashorn, JavaScript Engine − Java-based engine for executing and evaluating JavaScript code

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

Related questions

0 votes
asked Aug 28, 2022 in Redux by john ganales
0 votes
asked Jul 10, 2022 in ElasticSearch by sharadyadav1986
...