title: stringTokenizer method error
body: <p>I am trying to use stringTokenizer method for reading a 2D array stored in a file in the format..</p>
  
  <pre><code>1 1
  1 1 
  </code></pre>
  
  <p>the code is...</p>
  
  <pre><code>BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
  for(int i=0;i&lt;n;i++)
                  for(int j=0;j&lt;n;j++){
                      StringTokenizer tok = new StringTokenizer(in.readLine());
                      t[i][j]=Integer.parseInt(tok.nextToken());
                  }
  </code></pre>
  
  <p>when i run this i am getting the java.lang.NullPointerException error.However if i use this in file </p>
  
  <pre><code>1 1 1 1
  </code></pre>
  
  <p>the code works!
  <br>why is it happening?</p>