title: Java text file input
body: <p>i am currently doing a small task in java which i am very new to so please excuse any silly mistakes i have made. Basically i am trying to take 2 values from a text document, import them into my java document and then multiply them together. These 2 numbers are meant to represent the hourly pay and amount of hours worked, then the output is the total amount the member of staff has earned. This what i have so far ... </p>
  
  <pre><code>import java.util.*;
  import java.io.*;  
  
  public class WorkProject 
  { 
  
      Scanner inFile = new Scanner(new FileReader("staffnumbers.txt"));
  
      double Hours;
      double Pay;
  
      Hours = inFile.nextDouble();
      Pay = inFile.nextDouble();
      double earned = Length * Width;
  
              System.out.println(earned);
      }
  </code></pre>
  
  <p>What i have so far is basically me trying to get the .txt document into my java file. I'm not sure if this is right and then i'm not sure where to go to get the values to multiply and have it outputted. I understand what i have so far is probably just the very start of what i need but any help will be massively appreciated as i am keen to learn. Thanks so much .... Hannah </p>