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,576
  • 5
  • 32
  • 50

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
  • 267,707
  • 33
  • 569
  • 680