Why is there a need to check ArrayIndexOutOfBounds in FileInputStream in java? This same code is given as an example in a book for core java.
FileInputStream fis;
try{
fis=new FileInputStream("inputFIle.txt");
}catch(FileNotFoundException e){
System.out.println("File was not found");
}catch(ArrayIndexOutOfBoundsException e){
e.printStackTrace();
}
Aucun commentaire:
Enregistrer un commentaire