How to parse a Double value from a scanner object in a loop and pass to a new Array?
<p>Ok, I'm a bit closer but still getting a few errors. Netbeans is telling me my loanArray is not initialized and that it can't find the readLine() method? Also, my attempt to close in my finally block is listing errors. 
 Here's my code-</p>

<pre><code>// generate 2 constants for use in the array lookup values.
final int YEARS = 0;       
final int INTEREST = 1;
        //create the array
        double loanArray[][];

        try{    
            FileReader readTerms = new FileReader ("MortgageTerms.txt");
            BufferedReader loanTerms = new BufferedReader(readTerms);
            java.util.Scanner termScan = new Scanner(loanTerms);
                while(termScan.hasNext()){
                            for(int i=0;termScan != null; i++)
                        loanArray [i][YEARS]= Integer.parseInt (termScan.readLine());
                        loanArray [i][INTEREST] = Double.parseDouble (termScan.readLine());
                    }
            } catch (FileNotFoundException e){
                javax.swing.JOptionPane.showMessageDialog(null,
                "Error, File not found");
                        return;
              } catch (IOException ex){
                  javax.swing.JOptionPane.showMessageDialog(null, "There was an IO error");
                  return;
                  }
                    finally{
                     if (termScan!=null){
                            termScan.close();
                         }
                    }
</code></pre>
