title: executing code which reads from file and outputs data
body: <p>My code is meant to read from a random file that looks like this: (but without blank lines in between) </p>
  
  <p>Amy 12.23 7.43 4</p>
  
  <p>Jake 9.01 23.34 3</p>
  
  <p>Alan 34.00 34.21 7</p>
  
  <p>The file will always have this format but could be any number of lines. I made up a .txt document that looked like this to test my code. When I tried to run it on command line nothing happened. Any suggestions why and what I can do to fix that? </p>
  
  <pre><code> import java.util.Scanner;
   import java.io.*;
     public class EmployeePay {
       public static void main(String[] args) throws FileNotFoundException  {
          if (args.length != 1) {  
           final String msg = "Usage: EmployeePay name_of_input file";
            System.err.println(msg);
              throw new IllegalArgumentException(msg);
             }
         int linesCount = 0;
         final String inputFileName = args[0];
         final File input = new File (inputFileName); 
         final Scanner scanner = new Scanner(new FileReader(input));
  
        while (scanner.hasNextLine()) {
        linesCount = linesCount +1; 
        }
        String identification[] = new String[linesCount];
        double workTime [] = new double [linesCount];
        double moneyPerHour [] = new double [linesCount];
        int totalDeductions [] = new int [linesCount];
          for(int i = 0; i &lt; linesCount; i++){
           String line = scanner.nextLine();
           String [] lineParts = line.split(" ");
           identification[i]= lineParts[0];
           workTime[i]= Double.valueOf(lineParts[1]);
           moneyPerHour[i] = Double.valueOf(lineParts[2]);
           totalDeductions[i] = Integer.parseInt(lineParts[3]);
            double totalGrossPay = 0.00;
              if ((workTime[i] &gt;= 1.0) &amp;&amp; (moneyPerHour[i] &gt;= 15) &amp;&amp;   (totalDeductions[i]&gt;0)&amp;&amp;(totalDeductions[i]&lt;35)){
               double totalPay[] = new double[linesCount];
               totalPay[i] = workTime[i] *moneyPerHour[i];
               totalGrossPay += totalPay[i];
  
               double theTaxRate = 0.15;
               double taxTotal = theTaxRate * totalGrossPay; 
  
              double max = Double.MIN_VALUE;
              for (int a =0; a&lt; linesCount; a++) { 
               if (totalPay[a] &gt; max) { 
                 max = totalPay[a]; 
              }
            }
          System.out.println(totalGrossPay);
          System.out.println(taxTotal);
          System.out.println(max);
  
      }
  
     }
   }
   }         
  </code></pre>