title: Array without size in Java
body: <p>I'm trying to define an array without any specific size but cannot seem to figure it out.</p>
  
  <p>Any help is appreciated and any comments regarding my coding is awesome so I could fix that for future learning :)
  Also, the count variable seems to count 64 characters instead of the 27 in the txt file?</p>
  
  <p>Thanks.</p>
  
  <p>EDIT: FYI there is another class that contains some methods I'm currently working on (which is <code>MapFunctions</code> mentioned at the end of the code)</p>
  
  <pre><code>import java.io.FileInputStream;
  import java.io.InputStream;
  import java.util.Scanner;
  
  public class MapMain {
      public static void main(String[] args){
          Scanner input = new Scanner(System.in);
          String T;
          System.out.print("What is the file dest?");
          T=input.nextLine();
          //String [][] map = new String[!][!];
          InputStream is = null;
          int i;
          char c;
  
          try{
            // new input stream created
               is = new FileInputStream(T);
               System.out.println("Characters printed:");
               int count;
               count = 0;
               // reads till the end of the stream
               while((i=is.read())!=-1){
                  count=count+1;
                  c=(char)i;
  
                  // prints character
                  System.out.print(c);
                  for (int i = 0; i&lt;array1.length;i++){
                      for (int j = 0; j&lt;array1[i].length;j++){
                          array1[i][j]=c;
                      }
                  }
               }
               System.out.print("\n"+count+"\n");
          }catch(Exception e){
               // if any I/O error occurs
               e.printStackTrace();
          }finally{
          }
          MapFunctions ankosh = new MapFunctions();
      }
  }
  </code></pre>