title: Program only reading one line instead of entire file
body: <pre><code>    public static void main(String ar[]) throws FileNotFoundException{
      scan = new Scanner(new FileReader(new File("files.txt")));
      String nextLine = scan.nextLine();
      String[] fileNames = nextLine.split("\\s+");
  
      for(int i=0;i&lt;fileNames.length;i++){
          System.out.println(fileNames[i]);
      }
  
  
      for(int i=0;i&lt;nextLine.length();i++){
          char c = nextLine.charAt(i);
          boolean isWhiteSpace = isWhiteSpace(c);
          if(isWhiteSpace){
              if(c == ' ')
                  System.out.println("white space (blank) at index "+i);
              if(c == '\n')
                  System.out.println("white space (line feed) at index "+i);
              if(c == '\r')
                  System.out.println("white space (\\r - carriage return) at index "+i);
              if(c == '\t')
                  System.out.println("white space (\\t - tab) at index "+i);
          }
      }
  
  } 
  </code></pre>
  
  <p>I need help in solving this issue. Apparently my program only recognizes the first line in the file, when it supposed to be reading the whole file for the content. </p>
  
  <p>What changes do I need to make for that? thanks. </p>