How many catch blocks should a try block have?
It should have minimum one catch block.
it should have only one catch block.
a try block with out catch block is possible, in case if it is having finally block.
a try block should have both catch and finally attached to it.
A try block can have n number of catch blocks attached to it, but it is not mandatory also. You can have a try block with out any catch block in which case it should have finally block attached to it.
Back To Top