Oracle
1Z0-815 · Question #45
Which three are advantages of the Java exception mechanism?
The correct answer is A. Improves the program structure because the error handling code is separated from the normal C. Improves the program structure because the programmer can choose where to handle exceptions E. Allows the creation of new exceptions that are tailored to the particular program being created. B is false. Standard exceptions not cover all possible errors. D is false. Exceptions don't have to be handled in the method in which they occurred.
Handling Exceptions
Question
Which three are advantages of the Java exception mechanism?
Options
- AImproves the program structure because the error handling code is separated from the normal
- BProvides a set of standard exceptions that covers all the possible errors
- CImproves the program structure because the programmer can choose where to handle exceptions
- DImproves the program structure because exceptions must be handled in the method in which they
- EAllows the creation of new exceptions that are tailored to the particular program being created
How the community answered
(45 responses)- A84% (38)
- B9% (4)
- D7% (3)
Explanation
B is false. Standard exceptions not cover all possible errors. D is false. Exceptions don't have to be handled in the method in which they occurred.
Topics
#exception mechanism#custom exceptions#checked exceptions#program structure
Community Discussion
No community discussion yet for this question.