in Education by
Which of the following operators is used to generate instance of an exception which can be thrown using throw? (a) thrown (b) alloc (c) malloc (d) new The question was asked during an online interview. This intriguing question originated from Exception Handling in section Exception Handling 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
Right choice is (d) new For explanation I would say: new operator is used to create instance of an exception. Exceptions may have parameter as a String or have no parameter.

Related questions

0 votes
    Which of these keywords is used to generate an exception explicitly? (a) try (b) finally (c) ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 25, 2021 in Education by JackTerrance
0 votes
    What will be the step of the interpreter in a jump statement when an exception is thrown? (a) The ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 24, 2021 in Education by JackTerrance
0 votes
    Which exception is thrown by read() method? (a) IOException (b) InterruptedException (c) SystemException (d ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 24, 2021 in Education by JackTerrance
0 votes
    Which of these exception is thrown in cases when the file specified for writing is not found? (a) ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 24, 2021 in Education by JackTerrance
0 votes
0 votes
0 votes
0 votes
    Which of the following keywords is used for throwing exception manually? (a) finally (b) try (c) ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 25, 2021 in Education by JackTerrance
...