Computer Science, asked by balikakonkale3226, 1 year ago

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 Anonymous
2
Hey mate.
....



Here's ur ans. ⤵,


____________________________

ANY NUMBER PF STATEMENTS TO HANDLE EXCEPTION should be written within a catch block .


_____________________

hope \: it \: helps



Answered by smartbrainz
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