Hi Andy,
If your catch block you are catching a checked exception, then there must be possibility of it's occurrence of throwing an exception in try block.
see in your code foo6() method it doesn't throw any related exception so it fail to compile
void foo6 () {
try {}
catch (IOException e) {}
}
if you change this code to like this
Hope you understood this now