哪种方式更快,资源更少:
boolean = !boolean boolean ^= boolean
编辑:这不是一个基于意见的问题.有一个正确的答案.
java boolean xor
boolean ×1
java ×1
xor ×1