Skip to content

Instantly share code, notes, and snippets.

@alanland
Created June 28, 2013 04:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alanland/5882485 to your computer and use it in GitHub Desktop.
Save alanland/5882485 to your computer and use it in GitHub Desktop.
Java Boolean 操作符
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