title: Reading file and getting unknown source errors
body: <p>I'm trying to read some data out of a file, and then plug that into a Currency constructor and a couple other variables, but I'm getting errors. The relevant section of code:</p>
  
  <pre><code>public Bank(String fileName) {
      Scanner fileReader = new Scanner(fileName);
      bankName = fileReader.nextLine();
      commissionRate = fileReader.nextDouble();
  
      //setup each currency
      currency1 = new Currency(fileReader.next(), fileReader.nextDouble());
      currency2 = new Currency(fileReader.next(), fileReader.nextDouble());
      currency3 = new Currency(fileReader.next(), fileReader.nextDouble());
  }
  </code></pre>
  
  <p>Here's the error:</p>
  
  <pre><code>Exception in thread "main" java.util.NoSuchElementException
  at java.util.Scanner.throwFor(Unknown Source)
  at java.util.Scanner.next(Unknown Source)
  at java.util.Scanner.nextDouble(Unknown Source)
  at project3.Bank.&lt;init&gt;(Bank.java:16)
  </code></pre>
  
  <p>Some googling tells me this means its not able to read the file correctly. It works up to the <code>bankName = fileReader.nextLine()</code> part, but everything after that fails. And I can't see why its not able to find the next whatever, since the files its supposed to read look something like this:</p>
  
  <pre><code>First Fake Bank 
  1.1 
  MXN 1.1 
  EUR 1.2 
  JPY 118.7 
  </code></pre>
  
  <p>The structure is one line of string, then a double under that, then three lines with a string followed by a double.</p>