如果下面的“if”stmt 评估为 TRUE,则 Output 的值 = 20 或 10..
有人可以解释一下增量运算符是如何工作的吗?
public class Test {
public static void main(String[] args) throws IOException {
int Output = 10;
boolean b1 = true;
if ((b1 == true ) && ((Output += 10) == 20)){
System.out.println("We are Equal = " + Output);
}
else{
System.out.println("Not Equal = " + Output);
}
}
}