title: Storing Data from File into an Array
body: <p>So I have a text file with items like look like this:</p>
  
  <pre><code>350279 1 11:54 107.15 
  350280 3 11:55 81.27 
  350281 2 11:57 82.11 
  350282 0 11:58 92.43 
  350283 3 11:59 86.11
  </code></pre>
  
  <p>I'm trying to create arrays from those values, in which the first values of each line are in an array, the second values of each line are in an array, and so on.</p>
  
  <p>This is all the code I have right now, and I can't seem to figure out how to do it.</p>
  
  <pre><code>package sales;
  
  import java.io.File;
  import java.io.FileNotFoundException;
  import java.util.Scanner;
  
  public class Sales {
  
      public static void main (String[] args) throws FileNotFoundException {
  
          Scanner reader = new Scanner(new File("sales.txt"));
          int[] transID = new int[reader.nextInt()];
          int[] transCode = new int[reader.nextInt()];
          String[] time = new String[reader.next()];
          double[] trasAmount = new double[reader.hasNextDouble()];
  
  
      }
  }
  </code></pre>