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