Can any one please explain me why the statement given below is showing error.
public static void main(String args[]){
try{
}
catch(IOException t){ // line 4
}
}
This code is showing error that, unreachable catch block. But this error wont be there if I am handling any other exception. The code given below is not showing any error at line 4.
public static void main(String args[]){
try{
}
catch(Exception t){ // line 4
}
}
Can any one please explain it to me why this is happening.
Thanks in advance..