Joke Collection Website - Joke collection - Another stupid question about java. .

Another stupid question about java. .

| and |||| are OR operations in bit operations, that is, the same in the same bit is 0, otherwise it is 1, just like in the question, 0 and 1 are 1, 1 and 1 are 0, and 0 and 0 are 0.

|||| and | are both judgments before and after. If one of them is true, the result is true, otherwise it is false.

The difference between || and | is that after checking that the first half is true, it is directly positioned as true as a whole, and the second half will not be executed. The other will continue to execute the second half even if the first half is found to be true.

X=0 Assign x to 0. Then (x=0)==0) judge whether the two values before and after = = are equal, which is 1, and return true. The inequality returns false. The following ((y=20)==20) is the same. Obviously, the equation here returns true.