In this video we are discussing about optional class.
An Optional class is work like container in which we can hold nonnull objects.
Optional class is used to avoid any NullPointerException in application.
We have discussed below features of Optional class in this video.
1. How to wrap any Object in Optional class.
2. How to use of() and of Nullable method.
3. What is the difference between of() and ofNullable() method.
4. How to get Empty Optional instance.
5. If we pass null object in optional how it behaves.
6. How to use ifPresent() method to avoid NosuchElementException.
7. How to get actual value object from Optional class instance.
8. How to use filter method of Optional class.
Optional class is one of the most important feature of java 8.
To learn more about other Java 8 features refer below video links as-
1. Static Method in interface:
• Java 8 Static Method
2. Default Method in interface:
• Java 8 feature default method
3. DateTime API:
• Java 8 Feature Date Time Api
4. Method Reference:
• Java 8 Feature Method Reference
5. Base 64:
• Java8 Feature Base64
#java
#javaprogramming
#java8
#java8optionalclass
#java8stream
#jdk1.8
#optional
#class
#ofNullable
#default Method
#base64
#java8features
On this page of the site you can watch the video online Optional Class Java 8 Feature with a duration of hours minute second in good quality, which was uploaded by the user TechFest Java 05 August 2022, share the link with friends and acquaintances, this video has already been watched 14 times on youtube and it was liked by 0 viewers. Enjoy your viewing!