While adding a try/catch block in Eclipse, it gave me the option of \"Surround with try/multi-catch\" or \"Surround with try/catch.\"
This is the try/multi-catch:
I believe that your first code snippet will only be applicable if your JDK is Java JDK 7. while the second snippet will still run in JDK 7 and below.
If you have a line of code that is possible to throw different types of exception and you want to handle them all in a similar way, Multicatch will fit you since it saves several lines of code.
however, if you have a line of code that will throw several exceptions, and you want to handle those exceptions individually, a single catch exception will fit you more.