inputMismatchException Java reading doubles from plain text file
<p>Using</p>

<pre><code> double variable = inputFile.nextDouble();
</code></pre>

<p>Gives the mismatch error and I can't figure out why...  Anyone know what's up?</p>

<p>The input file is just a bunch of doubles like 5.0...</p>

<p>Okay here is the code snippet</p>

<pre><code>String fileName;
Scanner scanner = new Scanner(System.in);
System.out.println("\nEnter file name that contains the matrix and vector: ");
fileName = scanner.nextLine();
Scanner inputFile = new Scanner(fileName);


double a1 = inputFile.nextDouble();
</code></pre>

<p>the input file is a plain text document .txt in this format</p>

<pre><code>5.0 4.0 -3.0
4.0 2.0  5.0
6.0 5.0 -2.0
-13.0 4.0 12.0
</code></pre>

<p>I don't understand why it wouldn't take those as doubles...</p>

<p>As far as what its expecting the format of the file to be... I suppose binary?  isn't that the default?  I didn't specify in the code...</p>
