0 votes
in Education by (1.7m points)
Which of the following classes can catch all exceptions which cannot be caught?

(a) RuntimeException

(b) Error

(c) Exception

(d) ParentException

I got this question in a national level competition.

My question is from Exception Handling in portion 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 (1.7m points)
Correct choice is (b) Error

To elaborate: Runtime errors cannot be caught generally. Error class is used to catch such errors/exceptions.

Related questions

...