Optional Class Java 8 Feature

Publié le: 05 août 2022
sur la chaîne: TechFest Java
14
0

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


Sur cette page du site, vous pouvez voir la vidéo en ligne Optional Class Java 8 Feature durée heure minute seconde en bonne qualité , qui a été Téléchargé par l'utilisateur TechFest Java 05 août 2022, Partagez le lien avec vos amis et connaissances, sur youtube cette vidéo a déjà été regardée 14 fois et il a aimé 0 téléspectateurs. Bon visionnage!