title: Error in file reading in android
body: <pre><code>public class Test {
  public static void main(String args[])
  {
      String numbers[];
      numbers = new String[81];
  
  
      try {
              FileInputStream fileInput = new FileInputStream("level.txt");
              int r,index=0;
              char y;
              while ((r = fileInput.read()) != -1) {
                 y = (char)r;
                 numbers[index++] = y + "";
              }
          }catch(Exception e){System.out.println("you are pawned !!");}
  
          for(int i=0;i&lt;81;i++)
          System.out.println(numbers[i].length());
  }
  }
  </code></pre>
  
  <p>The above code is working perfectly fine in Java but as I use it in android it gives error - "Unfortunately the device has stopped working". Also "Test.java" and "level.txt" are in same folder so I don't see any reason why it isn't working in android.  </p>