If Multiple exceptions are allowed in catch() then it will reduce amount of redundant error handling code.
for example,
try{
// some statments
}
catch(Type1Exception t1, Type2Exception t2, Type3Exception t3) { // wish if this could be allowed
/* t1, t2, t3 are children of Exception and needs same error handling then why to have different catch blocks with same piece of code */
}
Yes – that’s why it’s supported in Java 7.
So your example would actually be: