Which of the following should be within a catch block ?(a) finally block
(b) single statement that handles Exception(c) any number of statements to handle Exception(d) throws keyword
Answers
Answered by
2
Hey mate.
....
☺
Here's ur ans. ⤵,
____________________________
ANY NUMBER PF STATEMENTS TO HANDLE EXCEPTION should be written within a catch block .
_____________________
....
☺
Here's ur ans. ⤵,
____________________________
ANY NUMBER PF STATEMENTS TO HANDLE EXCEPTION should be written within a catch block .
_____________________
Answered by
0
Any number of statements to handle Exception should be within a catch block
Answer: Option (c)
Explanation:
- A software program code traps an exception using an 'exception handler' at the 'catch block' in a program. The catch block means the catching of an exception.
- We can have multiple 'catch blocks' for the try statement. This block will have catching of specific exceptions along with catch base exception in the final block of code. In all the cases, only one exception happens at a time and only one catch block at a time will be executed.
Similar questions
Computer Science,
7 months ago
Computer Science,
7 months ago
Physics,
1 year ago
Chemistry,
1 year ago