这是什么牌子究竟是什么意思? | = [英] What does this sign exactly mean? |=
本文介绍了这是什么牌子究竟是什么意思? | =的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
| =
我很好奇,想了解该运营商, 我已经看到了这个符号使用,而在Java中设置标志。
例如:
notification.flags | = Notification.FLAG_AUTO_CANCEL;
-
是否执行某种位操作的?
-
这是什么标志究竟怎么办?
-
是否还有其他众所周知的标志与此类似?
解决方案
它等同于
notification.flags = notification.flags | Notification.FLAG_AUTO_CANCEL;
其中, |
是位或运算符或其中的两个变量逐位
这是很好本身已知的。也有 + =
, = -
, * =
, / =
,%=
,&安培; =
, ^ =
。
|=
I'm curious to learn about this operator, I've seen this notation used while setting flags in Java.
for example:
notification.flags |= Notification.FLAG_AUTO_CANCEL;
Does it perform some kind of bit manipulation?
What does this mark exactly do?
Are there any other well known signs similar to this?
解决方案
It is equivalent to
notification.flags = notification.flags | Notification.FLAG_AUTO_CANCEL;
where |
is bitwise OR operator which OR the two variables bit-by-bit.
It is well known by itself. There are also +=
, -=
, *=
, /=
, %=
, &=
, ^=
.
这篇关于这是什么牌子究竟是什么意思? | =的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文