Wednesday 10 August 2022

JAVA 8 Interview Question-2022 : What is Optional and why it is used ?

 Optional in JAVA 8:

Optional is a built in class present in java.util package also called as container class specifically used to represent optional values that exist or do not exist.

The main advantage is to avoid null. Here there is no NullPointerException will arise at the run time in the form of result.


Note: For getting JAVA, Python, Machine Learning, Deep Learning tutorial in detail, follow:

www.pythontpoints.com


                               -----------------------------Thank You----------------------------



Regards:

Trilochan Tarai  | Associate Manager, Delivery, Majesco India 

+91-9439202111

JAVA Interview Questions-2022 : JAVA 8 new Features !

 JAVA 8 newly Features:

1. Lambda Expression

2. Functional Interface

3. Method References

4. Stream API

5. Date Time API

6. Method References

7. Optional class present in java.util package

8. Nashorn : Highly improved JavaScript engine which enables the execution of JavaScript in JAVA.


                             -------------Thank You----------------- 


Regards:

Trilochan Tarai | Associate Manager, Delivery, Majesco India

+91-9439202111