in Education by
What is Optional object used for? (a) Optional is used for optional runtime argument (b) Optional is used for optional spring profile (c) Optional is used to represent null with absent value (d) Optional means it’s not mandatory for method to return object The question was asked in final exam. My doubt is from Java 8 Features topic in chapter Autoboxing & Miscellaneous of Java Select the correct answer from above options JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)

1 Answer

0 votes
by
Correct answer is (c) Optional is used to represent null with absent value Explanation: Optional object is used to represent null with absent value. This class has various utility methods to facilitate code to handle values as ‘available’ or ‘not available’ instead of checking null values.

Related questions

0 votes
    When does the function name become optional in JavaScript? (a) When the function is defined as a looping ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 24, 2021 in Education by JackTerrance
0 votes
    Object of which class is used to compile regular expression? (a) Pattern class (b) Matcher class (c ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 24, 2021 in Education by JackTerrance
0 votes
0 votes
0 votes
    Which property in the Window object is used to refer to a Location object? (a) position (b) area ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 23, 2021 in Education by JackTerrance
0 votes
    Which Window object method is used to display a message in a dialog box? (a) alert() (b) prompt( ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 23, 2021 in Education by JackTerrance
0 votes
    Which object can be used to create your own blobs? (a) Creator (b) BlobCreator (c) BlobBuilder (d ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 22, 2021 in Education by JackTerrance
0 votes
0 votes
    Deadlock is a situation when thread is waiting for other thread to release acquired object. (a) True (b ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 24, 2021 in Education by JackTerrance
...