Try catch exceptions
I got this:publicvoid fileIO(){
try{
File file =new File("aNewFile.txt");
System.out.println(file.exists());
}catch (IOException ioe){
System.out.println("IOException");
}
}
which tells me : exception java.io.IOException is never thrown in body of correspondingtry statement
, if I change the catch to}catch (Exception ioe){
, the error goes away.
My question is why is it giving the error and why is it not giving the error after changing the catch line ?

