What are the new features included in JAVA8 ?
Ans :- some features which are included in JAVA8 are as follows-
1.Lambda Expression.
2.Stream API
3.Default methods & Static Methods in Interface
4.Optional
5.Functional Interface
6.Method References
7.DATE and API
1.Lambda Expression :- Lambda expression is an Anonymous function, without name return type and having one Lambda Symbol (->)
=> The Process of declaring method without method name is Known as LambdaExpression,and which is also known as Anonymous method.
2.Stream API :- A stream is a Sequence of object that Supports various methods,Which Can be pipeLined to Produce the desired result.
5.Functional Interface:- functional interfaces are those interfaces which can have only one abstract method and it can have any number of default and Concrete methods.so it work as SAM(single abstract method)
6.Method References:- The process in which abstract method of Functional Interface is attached with method body from a class where the class is not releated to Interface is known as “Method Reference Concept”.
Method References are categorized into three types :
- Reference to Constructor
- Reference to Instance Method
- Reference to static Method
Leave a Reply