public class BankAccount {
private static final double annualInterestRate = 1.5;
private static double accountBalance = 150;
private static double MonthlyInterest;
public static void main(String[] args) {
// TODO Auto-generated method stub
calculateMonthlyInterest();
System.out.println(MonthlyInterest);
}
public static double calculateMonthlyInterest()
{
double MonthlyInterest = (accountBalance * annualInterestRate);
return MonthlyInterest;
}
}
这是我的代码,我正在尝试返回MonthlyInterest,但是当我打印出来时,我得到 0 而不是 225
动漫人物
一只名叫tom的猫
jeck猫
扬帆大鱼
相关分类