title: read content of File
body: <p>I have written a program for reading the contents of a file.</p>
  
  <pre><code>import java.io.*;
  
  public class FileLineReader {
    public static void main(String args[]) {
      try {
        FileReader reader =
            new FileReader("C:\\Users\\sriram\\Documents\\Java Programs\\" +
                           args[0]);
        BufferedReader buffer = new BufferedReader(reader); 
        String fileContent;
        while ((fileContent = buffer.readLine()) != null) {
          System.out.println(fileContent);
        }
      } catch(Exception e) {
        e.printStackTrace();
      }
    }
  }
  </code></pre>
  
  <p>So basically it reads contents from a particular folder.  If I give input as <code>FileLineReader.class</code> which is the .class file of the Java program the program outputs the bytecode but gives me a beep sound.  For all other files it gives the output properly. </p>
  
  <p>Can anyone tell me why?</p>