title: I need help reading a user-specified text file into an ArrayList of Strings using Java?
body: <p>I am advised to use a while loop the Scanner method hasNextLine() and
  in the while loop body, call the Scanner method nextLine(), and add the returned String to the ArrayList of Strings. I am new to Java so please keep that in mind. I'm not exactly sure if this is right, but this is what I have gotten so far:</p>
  
  <pre><code>Scanner input = new Scanner(new File(""));
  
      while(input.hasNextLine()) {
          String line = input.nextLine();
          System.out.println(line);
  </code></pre>