我的IDE(intelliJ)告訴我它無法解析「this.x」中的變量x。我是否正確地做這件事?無法解析私有方法中的變量
private Double localTax(){
double x = 0;
if(grossIncome <= 45000){
x = (grossIncome * 0.0115);
}
else if (grossIncome > 45000){
x = (45000 * 0.0115);
}
return this.x;
}
非常感謝! – Spectre