Showing posts with label Lambda Expression. Show all posts
Showing posts with label Lambda Expression. Show all posts

June 01, 2016

#Java8 : Java 8 Interview Questions and Answers..

What are new features introduced with Java 8 ?
Lambda Expressions, Interface Default and Static Methods, Method Reference, Parameters Name, Optional, Streams, Concurrency.
  • 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