**The code runs and calculates as I need it**

but I need to change the array value after the balance reaches 0 and set the balance back to 200,000- twice.

but I need to change the array value after the balance reaches 0 and set the balance back to 200,000- twice.

import java.text.*; public class my3prg420 { public static void main(String[] args) { int yearsArray[] = { 7, 15, 30 }; double InterestArray[] = { 5.35, 5.5, 5.75 }; double balance = 200000.00; double newbalance = 200000.00; double monthly_payment; double monthly_principal; double monthly_interest; NumberFormat nf = NumberFormat.getCurrencyInstance(); double y_rate = (InterestArray[2]/100/12); monthly_payment = balance * (y_rate/ (1-Math.pow((1+y_rate),-1* (yearsArray[2] *12)))); System.out.println("\t\t\t\tAmortization Schedule -\tBorrowed amount is $200,000.\n"+ "\t\t\t\t\tThis loan is for 30 years @ 5.75% interest annually.\n"+ "\t\t\t\t\t\tThe monthly payment is-" + nf.format(monthly_payment)+"\n"); for (int i = 1; i <= yearsArray[2]*12; i++) { monthly_interest = (balance*y_rate); monthly_principal = (monthly_payment - monthly_interest); balance = (balance - monthly_principal); System.out.println("\tBalance remaining " + nf.format(balance)+ "\t\tInterest paid this payment " + nf.format(monthly_interest)+ "\t\tPrincipal paid this payment" + nf.format(monthly_principal)+"\n"); try {Thread.sleep(5);} catch (InterruptedException a){} if(balance < 1); Stuck here } System.out.println("\t\t\t\tAmortization Schedule -\tBorrowed amount is $200,000.\n"+ "\t\t\t\t\tThis loan is for 30 years @ 5.75% interest annually.\n"+ "\t\t\t\t\t\tThe monthly payment is-" + nf.format(monthly_payment)+"\n"); } }