import java.util.*; import java.io.*; public class TryOpen2 { public static void main (String [] args) { Scanner fileScanner; fileScanner = null; try { fileScanner = new Scanner ("a.txt"); fileScanner.close (); } catch (FileNotFoundException fnfe) { System.out.println (" fnfe worked "); } catch (IOException ioe) { System.out.println (" ioe worked "); } /* ----jGRASP exec: javac U:\Web\CS239\Lectures\Lecture9\TryOpen2.java TryOpen2.java:18: exception java.io.FileNotFoundException is never thrown in body of corresponding try statement catch (FileNotFoundException fnfe) ^ TryOpen2.java:22: exception java.io.IOException is never thrown in body of corresponding try statement catch (IOException ioe) ^ 2 errors ----jGRASP wedge2: exit code for process is 1. ----jGRASP: operation complete. */ } }