Course contentsShow
Java
Lesson 1764 of 2,87037. Optional for Null SafetyPro lesson

Optional.of(): Wrapping Non-Null Values

Use Optional.of() to wrap a non-null value; understand that passing null throws NullPointerException immediately.

This lesson is for subscribers

You've completed the free preview. Subscribe to unlock every lesson in every course.