import java.io.*; class readAFile { public static void main(String args[]) { String filename = new String("readAFile.java"); File n = new File("readAFile.java"); try{ FileReader fr = new FileReader(n); BufferedReader br=new BufferedReader(fr); String line=""; while( (line=br.readLine()) !=null ) {System.out.println(line);} } catch (FileNotFoundException fnfe) { System.out.println("We're sorry , we can't find your file right now. "); } catch(IOException ioe) { System.out.println("I/O Exception with your file mate"); } } }