The only other possible combination is, try block followed by multiple catch blocks

Q) Whether multiple catch is possible for single try-block ?

Yes, it is very much possible to declare multiple catch block for single try-block

Example, as shown in the below screen-capture

Q) What are rules for declaring multiple catch-blocks ?

For try with multiple catch block, order of exception declaration is very important

That’s, most specific exception must come up 1st in the order and followed by more general exception

In other words, if there exists parent-child relationship between 2 exception then child exception must come 1st up in the order and then followed by parent exception

Otherwise, compile-time error will be thrown stating “Exception <name-of-exception> has already been caught”

Also, declaring multiple catch with same type of exception results in compile-time error stating “Unreachable catch block for <exception-type>. It is already handled by the catch block for <exception-type>”

It is very much possible that, code inside catch-block too raises exception and this need to be handled

Otherwise, program terminates abnormally

Q) Whether it is possible to declare catch-block with same exception-type twice, for example ArithmeticException ?

No, it isn’t possible to declare multiple catch with same exception-type

This leads to compile-time error stating “Unreachable catch block for ArithmeticException. It is already handled by the catch block for ArithmeticException”

Example, as shown in the below screen-capture

Section C) Exception information:

Q) What are various methods available to print exception information in console ?

Whenever exception is raised. then respective method from where exception is raised is responsible for creating an exception object with following information like
1. Name of the exception
2. Description of the exception
3. Location at which exception is raised i.e.; stack trace

All resources declared as part of try-with-resources statement must be AutoCloseable (i.e.; all resources must implements java.lang.AutoCloseable interface)

Multiple resources can be declared inside try block argument; but they are all must be separated by semi-colon (;)

While using try-with-resources statement, try-block itself is enough. There is no compulsion to write/code either catch-block or finally-block followingtry block, whereas in prior versions try-block must be followed by either catch-block or finally-block

Q) Whether it is mandatory to follow catch-block or finally-block, after try-with-resources statement (try-block) ?

It isn’t mandatory to have either catch-block or finally-block following try-block

try-block alone can work without the need of catch-block or finally-block

Q) How is multi-catch block is useful over traditional multiple catch blocks ?

Multi-catch block:

In Java 1.6 or lesser version, whenever multiple exception is thrown, then programmer has to provide multiple catch block to catch different types of exception, although exception handling code is same

But in Java 1.7 version, we can write/code single catch block to handle multiple types of exceptions using multi-catch block

Multi-catch block helps to provide same handler-code by grouping different exception-types. And program/code becomes more readable with lesser lines of code