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,035
  • 8
  • 56
  • 92
panschk
  • 3,158
  • 3
  • 23
  • 20

0 Answers0