Use of finally
String line;
try {
while ((line = myFile.readLIne()) != null) {
// process line
}
}
catch (IOException e) {
showStatus(“Error in File”);
}
finally {
myFile.close();
}
Previous slide
Back to first slide
View graphic version