title: Why I am unable to get output while copying data from file to array FileReader
body: <p>I am unable to get the output while practicing a question on FileReader
  As from my point of view it will show a[where i posted why no output particularly]</p>
  
  <pre><code>import java.io.*;
  
  public class FileWriter1 
  {
  
      public static void main(String s[])throws Exception
      {
          //char b='a';
          File f=new File("abc.txt"); //my file has a single character a 
          f.createNewFile();
  
          FileReader fr=new FileReader(f);
          System.out.println(fr.read()); //1 
          char ch[]=new char[(int)(f.length())];
          fr.read(ch);//file data copied to array
          //fr.read(ch)
          for(char ch1:ch) 
          {
              System.out.println(ch1);   //2 why output is not coming here
          }
          System.out.println("********************"); //3
          FileReader fr1=new FileReader(f);
          int i=fr1.read();
          while(i!=-1)
          {
              System.out.println((char)i);  //4
              i=fr1.read();   
          }
          fr.close();
      }       
  }
  </code></pre>
  
  <p>Output Shown:</p>
  
  <pre><code>97
  
  *****
  a
  </code></pre>