title: Doesn't save the words in array
body: <p>i've got a propably simple question. I try to read the file and i want to add each single word to my array "phrase". The problem occures in for loop. I got the exception "index 0 out of bounds for length 0". 
  Can you please help me with that? </p>
  
  <pre><code>    String [] tokens;
      String line;
      String hash = " ";
      int n = 0;
      String [] phrase = new String [n];
  
      public void loadFile()
      {
          try
          {
              @SuppressWarnings("resource")
              BufferedReader br = new BufferedReader(new FileReader("z3data1.txt"));
  
              while((line = br.readLine()) != null)
              {
                  tokens = line.split("[ ]");
                  n += tokens.length;
              }
              for(int j = 0; j&lt;tokens.length; j++)
              {
                  phrase[j] = tokens[j];
              }
          }
          catch(IOException ex)
          {
              ex.printStackTrace();
          }
     }
  </code></pre>