-3
當調用AddBirthdayBonus
時,餘額字段不會更新。任何幫助表示讚賞。java - 字段不會更新
public class class
{
private float balance;
private float bob;
public class(float amount, float bob)
{
balance = amount;
}
birthdate = birthday;
}
public void AddBirthdayBonus(float todayDate)
{
if (todayDate == bob)
{
balance += 5;
}
}
你怎麼知道它沒有更新?你在哪裏使用它,它沒有正確顯示? – Poindexter 2011-02-11 16:49:02