This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
When you have a catch block, you provide an "argument" like this:
In this example, "IOException ioe" and "Exception e" are the "arguments" that are being passed to the exception block.
Say, for example, that our try block throws a RuntimeException, which is a subclass of Exception. There is no catch block for a RuntimeException. However, the way exception handling works is that, if no catch block is found for the given type of exception, the JVM will look for a catch block of any superclasses of the exception thrown. In this case, we have one - Exception. Because a RuntimeException "is a" type of Exception (it extends Excepetion), this makes sense. Therefore, since there is no specific way to handle a RuntimeException, we'll handle it just like we would an Exception.