Only 1 result is being displayed
<p>I have this problem for homework and the issue I'm having is when I run the program and input the values I only get one result 
for instance if I enter 30 for the number of years I get this "30   14730.576123040439" 30 times. Any ideas of what I can do to get the proper results to display(ie years 1-30 instead of just the correct result for year 30 30 times).</p>

<pre><code>   public class FinancialApp57 
   {
       public static void main(String[] args) 
       {
           //variables
           double intRate, invAmt;
           int yrs;
           String inv = JOptionPane.showInputDialog("Enter an investment amount:");
           invAmt = Double.parseDouble(inv);
           String rate = JOptionPane.showInputDialog("Enter an intrest rate: ");
           intRate = Double.parseDouble(rate);
           String yr = JOptionPane.showInputDialog
                   ("Enter the lenght of investment(in years): ");
           yrs = Integer.parseInt(yr);

           futureInvestmentValue(invAmt,intRate/12,yrs);
       }

       public static double futureInvestmentValue
               (double investmentAmount,double monthlyIntrestRate,int years)
       {
           double FutureValue = 0;
           int i = 1;
           FutureValue=
                   investmentAmount*Math.pow((1+monthlyIntrestRate/100),years*12);

           while(i&lt;years)
           {            
               System.out.println(years+"\t" + FutureValue);
               i++;
           }
           return FutureValue;

       }
   }
</code></pre>
