Which of the following is an advantage of using a try...catch block ?(a) Exceptional events are eliminated(b) Exceptional events are reduced(c) Exceptional events are integrated with regular events(d) Exceptional events are isolated from regular events
Answers
Answered by
1
Hello
Q:- Which of the following is an advantage of using a try...catch block
Following are the advantage of catch block:-
1)) Exceptional events are isolated from regular events
2) it's in the form of regulations. Exceptional events are isolated from regular events.
3)Exceptional events are Increased.
Thanks!!!
Q:- Which of the following is an advantage of using a try...catch block
Following are the advantage of catch block:-
1)) Exceptional events are isolated from regular events
2) it's in the form of regulations. Exceptional events are isolated from regular events.
3)Exceptional events are Increased.
Thanks!!!
Answered by
3
"Exceptional events" are isolated from regular events is an advantage of using a "try...catch block"
Answer: Option (d)
Explanation:
In Java when an error occurs, the program will normally stop and produce an error message. Technically this is called throwing an exception. The try and catch keywords always should come in pairs. The try-catch block functions as follows.
- The "try statement" allows defining a "block of code statements" to be executed, where an exception may arise.
- The "catch statement" allows defining a "block of code statements" to be executed if an error occurs in the try block.
Similar questions