Optional is a container object that may or may not contain a non-null value. If a value is present, isPresent()
will return true
and get()
will return the value.
Package : java.util
public final class Optional<T>
extendsObject
Tips, Expertise, Articles and Advice from the Pro's for Your Website or Blog to Succeed
Optional is a container object that may or may not contain a non-null value. If a value is present, isPresent()
will return true
and get()
will return the value.
Package : java.util
public final class Optional<T>
extendsObject