Q. What is the purpose of the ‘Optional’ class?
Solution:
Optional is used to represent a value that may or may not be present, reducing null pointer risks.
Get Question Bank
Strengthen Your Practice with our comprehensive question bank.
Optional is used to represent a value that may or may not be present, reducing null pointer risks.
Strengthen Your Practice with our comprehensive question bank.