here my code :

public static void main(String[] args) {
Scanner input = new Scanner (System.in);
System.out.print("Loan Amount: ");
double loan=input.nextDouble();
System.out.print("Number of Years: ");
int year=input.nextInt();
System.out.print("Annual Interest Rate: ");
double annual=input.nextDouble();
float monthlyPayment = (float)(loan * annual / (1 -1 / Math.pow(1 + annual /1200, year *12)));
System.out.println("Monthly Payment: "+monthlyPayment);
System.out.println("Total Payment: "+monthlyPayment);
for ( int i =1 ; i <= 12 ;i++){
double balance = 0;
double interest = annual * balance;

double principal = monthlyPayment - interest;
balance = balance - principal;
System.out.println("Payment Interest Principal Balance");
System.out.println(i + "\t\t" + interest+"\t"+principal+"\t"+balance);
}
}
}
2 hours ago - 4 days left to answer.
Additional Details
i need help to print out Payment Interest Principal Balance
if user enter Loan Amount : 10000
Number of year: 1
Annual Interest Rate: 7 %

it will print out
Monthly Payment: 865.26
Total Payment : 10383.21

Payment# Interest Principal Balance
1 58.33 806.93 9193.07
2 53.62 811.64 8381.43
...
12 5.01 860.25 0.01