Java Programming - Exceptions - Discussion
Discussion Forum : Exceptions - Pointing out the correct statements (Q.No. 6)
6.
Which four can be thrown using the throw statement?
- Error
- Event
- Object
- Throwable
- Exception
- RuntimeException
Answer: Option
Explanation:
The (1), (4), (5) and (6) are the only four that can be thrown.
An Error is a subclass of Throwable that indicates serious problems that a reasonable application should not try to catch.
The Throwable class is the superclass of all errors and exceptions in the Java language.
The class Exception and its subclasses are a form of Throwable that indicates conditions that a reasonable application might want to catch (checked exceptions)
RuntimeException is the superclass of those exceptions that can be thrown during the normal operation of the Java Virtual Machine.
Discussion:
Be the first person to comment on this question !
Post your comments here:
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers