4

(a && b) has the same value as (a & b), but with && the expression b is not executed if a is false. In Java there is also an operator &=. a &= b is the same as a = a & b.

Question: Why isn't there an operator &&=, at least in Java. Is there some reason why I would not make sense to have it, or is it simply that no one cares or needs it?

Jon Seigel
  • 12,251
  • 8
  • 58
  • 92
panschk
  • 3,228
  • 3
  • 24
  • 20

0 Answers0