title: Java File not being printed into ArrayList with Scanner
body: <p>I am coding software to automatically schedule employees (meant to be used for restaurants/retail businesses).</p>
  <p>I am having trouble using a Scanner to break my file up into an ArrayList of Strings. Please help.</p>
  <pre><code> private static void generateStoreData() {
          
          File storeData = null;
          //creation of storeData file
          try {
              storeData = new File(&quot;storeData.txt&quot;);
              if (!(storeData.exists()))
                  storeData.createNewFile();
          }
  
          catch (IOException e) {
              clearScreen();
              System.out.print(&quot;There was an error locating your file. Exiting program.&quot;);
              System.exit(0);
          }
  
          //putting data into List of Strings
          ArrayList&lt;String&gt; storeDataLines = readFileData(storeData);
  
          System.out.print(storeDataLines);
      }
  
      private static ArrayList&lt;String&gt; readFileData(File fileName) {
  
          ArrayList&lt;String&gt; lines = new ArrayList&lt;String&gt;();
          try {
              Scanner fileScanner = new Scanner(fileName);
              while (fileScanner.hasNextLine()) {
                  String line = fileScanner.nextLine();
                  lines.add(line);
              }
  
          }
  
          catch (Exception e) {
              clearScreen();
              System.out.print(&quot;There was an error reading from this file.&quot;);
              System.exit(0);
          }
  
          return lines;
      }
  </code></pre>
  <p>I have attached the two methods dealing with the files for reference.</p>
  <p>This is the text file I am working with for testing.</p>
  <pre><code>STORE HOURS:
  
  Sunday: CLOSED
  Monday: 5:00-21:00
  Tuesday: 5:00-21:00
  Wednesday: 5:00-21:00
  Thursday: 5:00-21:00
  Friday: 5:00-21:00
  Saturday: 5:00-21:00
  </code></pre>