1Z0-803 · Question #29
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. A: The error handling is separated from the normal program logic. C: You have some choice where to handle the exceptions. E: You can create your own exceptions. Incorrect answers: B: The standard exceptions do not cover all possible errors. They can be handled in the method which
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
- DExceptions do not need to be handled in the method where they occurred.
- Eallows the creation of new exceptions that are tailored to the particular program being
How the community answered
(36 responses)- A94% (34)
- B3% (1)
- D3% (1)
Explanation
A: The error handling is separated from the normal program logic. C: You have some choice where to handle the exceptions. E: You can create your own exceptions. Incorrect answers: B: The standard exceptions do not cover all possible errors. They can be handled in the method which is calling the method that throws an exception.
Topics
Community Discussion
No community discussion yet for this question.