只需1節課。我有一個錯誤。當鼠標懸停的錯誤,它提示了「令牌語法錯誤」;「,=預計」 以下是我的編碼,請幫助我!非常感謝朋友。 enter image description hereJava錯誤 - 令牌上的語法錯誤「;」,=,預期
package HelloWorld;
public class BankAccountManagement {
private String accountNumber;
private double balance;
private String customerName;
private String email;
//private String phoneNumber;
this.balance=100.00;
public void withdrawn(double amount) {
if (this.balance < amount) {
System.out.println("không thể rút dược" + amount);
System.out.println("chỉ có thể rút dược" + this.balance);
} else {
// public void deposit(double amount){
this.balance += amount;
System.out.println("bạn gửi thành công" + amount);
System.out.println("so du hien tại" + this.balance);
//System.out.println("phone" + this.phoneNumber);
}
}
}
或者直接在聲明中進行初始化。 – talex
[Here](https://docs.oracle.com/javase/tutorial/java/javaOO/thiskey.html)是_this_的Java tuturial –