title: Unable to read whole file, reads just one line
body: <pre><code>while(reader.hasNextLine()){
      String s = reader.nextLine();
      String[] tokens = s.split(" ");
  
      while(t &lt; tokens.length){
          a = 0;
  
          while( a &lt; 6 ) {
              if(tokens[t].equals(d[a])){
                  System.out.println("found keyword -&gt; " + tokens[t]);
                  files = 1;
              }
              a++;
          }
  
          p = 0;
  
          while( p &lt; 2 ) {
              if(tokens[t].equals(xyz[p])){
                  System.out.println("found token -&gt; " + tokens[t]);
                  files2 = 1;
              }
              p++;
          }
          if (files2 == 0 &amp;&amp; files == 0){
              System.out.println("found identifier -&gt; " + tokens[t]);
          }
  
          files = 0;
          files2 = 0;
          t++;
      }
  
      reader.close();
  }
  </code></pre>
  
  <p>I posted something similar like this the other day, but however the while loop didn't fix it . Can some please help me through this. The problem is that it doesn't read the entire the file but only reads the one line, and that is the first line. I don't know what I am doing honestly. Thanks. </p>