Introduction to the Java Optional Class
Welcome. Today we are taking an introductory look at the Java Optional Class. We will focus primarily on the Optional Class and what it is for. Then we will cover why it is useful and how to use it in our code. Finally, we wrap up with four hands examples of using the different types of Optional methods in our code. What is Java the Optional Class? The optional class is essentially a container object, which may or may not contain a non-nullable value. Why should we use the Java Optional Class? One of the biggest problems with Java is that when we create variables or methods with return types, our intent is unclear if the value of these will... Read more