I have read that
b1 |= b2
b1 = b1 | b2
b1 = b1
There are many operators in Java. But 'Compound comparison operator' is not one of them. You should read Java basics from a good book like 'Head first Java'.
To answer this particular question, b1 |= b2
is compound assignment.
=
assigns the the result of b1|b2
to LHS operand i.e b1
.assignment
operator not comparison, the result of b1 |= b1
will be same as b1 = b1|b1
.(Note |
here is the logical OR
between two numbers not ||
which is a conditional operator. |
and ||
have different meanings)
HTH.