in Education by

What is Optional in Java8 in Java8?

Please log in or register to answer this question.

1 Answer

0 votes
by

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.

Related questions

0 votes
asked May 17, 2022 in Education by JackTerrance
0 votes
asked Dec 23, 2021 in Education by JackTerrance
0 votes
asked Nov 8, 2020 in Education by Editorial Staff
...