What is the purpose of the `Optional` class in Java?
The `Optional` class is used to indicate a value that can be null, so it helps to work with nullable values.
Thatâ€™s partially correct. While `Optional` can represent the absence of a value, it doesnâ€™t necessarily indicate that the value is null.
Can you explain the difference between `Optional.empty()` and `Optional.ofNullable()`?