Check out example codes for "instantiate optinal java 8". It will help you in understanding the concepts better.

Code Example 1

Person p = new Person();
Optional<Person> op = Optional.of(p);

Learn ReactJs, React Native from akashmittal.com