只是想知道为什么我得到
无法解析符号'等于'
在string.equals上。我正在使用android studio。
public class Transaction {
String type;
double amount;
if(type.equals("Deposit")){
};
}
你必须在以下函数中编写测试:
public class Transaction {
String type;
double amount;
public void testType() {
if(type.equals("Deposit")) {
}
}
}