Java语法 - 什么是| =意思

时间:2012-04-25 01:13:17

标签: java syntax

  

可能重复:
  Java Operators : |= bitwise OR and assign example

在Java中是什么意思?

例如下面;


note.flags | = Notification.FLAG_AUTO_CANCEL

由于

1 个答案:

答案 0 :(得分:10)

始终先到这里:http://docs.oracle.com/javase/tutorial/java/nutsandbolts/operators.html

它是按位或赋值运算符。

它与:

相同
note.flags = note.flags | Notification.FLAG_AUTO_CANCEL;