求指教Reterement中的代码
package SecondNight;
import java.util.*;
public class Reterement {
?/**
? * @param args
? */
?public static void main(String[] args) {
??// TODO Auto-generated method stub
??Scanner? in=new Scanner(System.in);
??System.out.println("请输入你的年薪(payment)");
??double payment =in.nextDouble();
??System.out.println("请输入你的利息率");
??double interestRate=in.nextDouble();
??double? balance=0;
??int year=0;
??String input;
??//当用户没有退休时就更新账户
??do{
???// 添加这一年的平均年薪和利息率
???balance+=payment;
???double interest=balance*interestRate/100;
???balance+=interest;
???year++;
???//输出现在的收入
???System.out.printf("After year%d,your balance is %,.2f%n",year,balance);
???System.out.print("Ready to retire?(Y/N)");
???input=in.next();
???
??}
??while(input.equals("N"));
???
?}
}
?
?
?
?
?
?
这段代码中?System.out.printf("After year%d,your balance is %,.2f%n",year,balance);
?
我不明白,希望高手指教,
?