3

Possible Duplicate:
Java Operators : |= bitwise OR and assign example

what does |= mean in Java?

For example below;


note.flags |= Notification.FLAG_AUTO_CANCEL

Thanks

Community
  • 1
  • 1
ControlAltDelete
  • 3,516
  • 5
  • 31
  • 49

1 Answers1

10

Always go here first: http://docs.oracle.com/javase/tutorial/java/nutsandbolts/operators.html.

It's the bitwise-or assignment operator.

It's the same as:

note.flags = note.flags | Notification.FLAG_AUTO_CANCEL;
Oliver Charlesworth
  • 260,367
  • 30
  • 546
  • 667