Java Syntax What does | = mean

Possible duplicate:
Java statements: |= bitwise OR and assignexample

which means | = mean in Java?

For example below:


note.flags | = Notification.FLAG_AUTO_CANCEL

thank

+3
source share
1 answer

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

This is a bitwise or assignment operator.

This is the same as:

note.flags = note.flags | Notification.FLAG_AUTO_CANCEL;
+10
source

All Articles