Java – if first is true, it is logical or the second statement is ignored
•
Java
See English answers > java logical operator short circuiting 9
Solution
No, No
>Using the Boolean operator |, if the first item is true, the second item will not be evaluated. > Using bitwise operators | both terms are evaluated
Also
>Use Boolean operator & & amp;; If the first term is false, the second term is not evaluated > using the bitwise operator &, two terms are evaluated
Java operator docs here
The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
二维码