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

1 Answer

0 votes
by
 
Best answer
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 operator is used to generate an instance of an exception than can be thrown by using throw? ... Handling of Java Select the correct answer from above options...
asked Mar 1, 2022 in Education by JackTerrance
0 votes
    Which of these keywords is used to generate an exception explicitly? (a) try (b) finally (c) throw (d) ... Exception Handling of Java Select the correct answer from above options...
asked Mar 1, 2022 in Education by JackTerrance
0 votes
    Which of these keywords must be used to handle the exception thrown by try block in some rational manner? (a ... Handling of Java Select the correct answer from above options...
asked Mar 1, 2022 in Education by JackTerrance
0 votes
    Which of the following keyword is used by calling function to handle exception thrown by called function? (a) ... Handling of Java Select the correct answer from above options...
asked Mar 1, 2022 in Education by JackTerrance
0 votes
    Which of these keywords are used for generating an exception manually? (a) try (b) catch (c) throw (d) ... Exception Handling of Java Select the correct answer from above options...
asked Mar 1, 2022 in Education by JackTerrance
0 votes
    Which of the following keywords is used for throwing exception manually? (a) finally (b) try (c) throw ( ... Exception Handling of Java Select the correct answer from above options...
asked Mar 1, 2022 in Education by JackTerrance
0 votes
    Which of the following handles the exception when a catch is not used? (a) finally (b) throw handler (c ... Exception Handling of Java Select the correct answer from above options...
asked Mar 1, 2022 in Education by JackTerrance
0 votes
    Which of the following should be true of the object thrown by a thrown statement? (a) Should be assignable ... Handling of Java Select the correct answer from above options...
asked Mar 1, 2022 in Education by JackTerrance
0 votes
    Which of these handles the exception when no catch is used? (a) Default handler (b) finally (c) throw ... Exception Handling of Java Select the correct answer from above options...
asked Mar 1, 2022 in Education by JackTerrance
0 votes
    Which of these methods return description of an exception? (a) getException() (b) getMessage() (c) ... Handling of Java Select the correct answer from above options...
asked Mar 1, 2022 in Education by JackTerrance
0 votes
    Which of these methods return localized description of an exception? (a) getLocalizedMessage() (b) getMessage() (c ... Handling of Java Select the correct answer from above options...
asked Mar 1, 2022 in Education by JackTerrance
0 votes
    Which of the following is a super class of all exception type classes? (a) Catchable (b) RuntimeExceptions (c ... Handling of Java Select the correct answer from above options...
asked Mar 1, 2022 in Education by JackTerrance
0 votes
    Which of these keywords is not a part of exception handling? (a) try (b) finally (c) thrown (d) ... Exception Handling of Java Select the correct answer from above options...
asked Mar 1, 2022 in Education by JackTerrance
...