Last updated 5 years ago
import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.IOException; public class CaseBaseExceptionBeforeDerived { public static void main(String[] args) { FileInputStream fis = null; try { fis = new FileInputStream("file.txt"); fis.close(); } catch (IOException ioe) { System.out.println("IOException"); } catch (FileNotFoundException fnfe) { System.out.println("File not found"); } } }