Return to site

JAVA CERTIFICATION QUESTION: Use the Optional class

· java

The goal of this quiz is to test your knowledge of the Java Optional class.

Given the class:

What is the output if you run the compiled class as shown below? Choose one.

  • A. A runtime exception
  • B. Blank output
  • C. Java
  • D. default

 

 

 

 

 

 

 

 

 

The answer is D.

All Posts
×

Almost done…

We just sent you an email. Please click the link in the email to confirm your subscription!

OK