Aryan PrajapatKnowledge Contributor
A single try block and multiple catch blocks can co-exist in a Java Program. Explain.
A single try block and multiple catch blocks can co-exist in a Java Program. Explain.
One or more catch blocks can follow a try block. Each catch block must have a unique exception handler. So, if you want to perform multiple tasks in response to various exceptions, use the Java multi-catch block.