Created
June 28, 2013 04:38
-
-
Save alanland/5882485 to your computer and use it in GitHub Desktop.
Java Boolean 操作符
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The boolean logical operators are : | , & , ^ , ! , || , && , == , != , ?: | |
| the OR operator | |
& the AND operator | |
^ the XOR operator | |
! the NOT operator | |
|| the short-circuit OR operator | |
&& the short-circuit AND operator | |
== the EQUAL TO operator | |
!= the NOT EQUAL TO operator | |
?: the IF-THEN-ELSE operator | |
These opearators act on boolean opearands according to this table | |
A B A|B A&B A^B !A | |
false false false false false true | |
true false true false true false | |
false true true false true true | |
true true true true false false |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment