0
What is Optional in Java8?

Open 1 Answers 26 Views Education

What is Optional in Java8 in Java8?

1 Answer

0

What is Optional in Java8?

Optional is a container object which is used to contain not-null objects. Optional object is used to represent null with absent value. This class has various utility methods to facilitate code to handle values as 'available' or 'not available' instead of checking null values. It is introduced in Java 8 and is similar to what Optional is in Guava.

by (54.6k points)
...