This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center。
已关闭8年。
Java是否有
什么是
这是一个明智的选择。这意味着您总是要评估双方,然后取“逻辑和”(仅当双方都为真时,结果才为真)。
已关闭8年。
Java是否有
&=
运算符?我看到以下代码:boolean allReady = true;
for(Entry<String,Boolean> ace : factory.readyAces.entrySet()) {
allReady &= ace.getValue();
什么是
&=
? 最佳答案
与以下内容相同:
allReady = allReady & ace.getValue();
这是一个明智的选择。这意味着您总是要评估双方,然后取“逻辑和”(仅当双方都为真时,结果才为真)。
关于java - Java中的&符运算符是什么? ,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/10789119/