Multiple Choice
Which of the following statements related to the Optional type is NOT correct?
A) The Optional.orElse method obtains the value of an Optional or, if no value is present, the value given by its parameter.
B) The findFirst method on a stream returns an Optional describing the first element of this stream, or an empty Optional if the stream is empty.
C) The Optional.of method creates a stream of Optional objects provided as an explicit parameter.
D) The Optional class is a wrapper for objects that may or may not be present, which is typically used in results for stream processing.
Correct Answer:

Verified
Correct Answer:
Verified
Q22: You want to save stream values in
Q23: Complete the following statement that finds the
Q24: Complete the following code snippet to determine
Q25: Complete the code to sort the employees
Q26: Which lambda expression represents a function that
Q28: Complete the code to sort the employees
Q29: Complete the following statement that uses streams
Q30: Complete the following code snippet to find
Q31: Which method causes stream operations to be
Q32: Which of the following is NOT a