草庐IT

shouldDraw

全部标签

java - 冗余条件

我在Oracle网站上看到的这段代码有问题。有人可以为我解释一下吗?ActionupdateCursorAction=newAbstractAction(){booleanshouldDraw=false;publicvoidactionPerformed(ActionEvente){if(shouldDraw=!shouldDraw){// 最佳答案 if(shouldDraw=!shouldDraw)这不是在做if(shouldDraw!=shoundDraw)。我认为这就是让你感到困惑的原因。相反,它对shouldDraw进行