- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我尝试编译并运行以下代码
public static void main(String... args) {
int x = 1 | 2 | 3 | 4;
//int x = 1 | 1 | 1 ;
//int x = 1 | 2 ;
//int x = 2 | 1 ;
System.out.println(x);
}
我在 dot net 中尝试过,但它不工作,为什么它在 java 中工作?如何评估这段代码以产生答案?
最佳答案
1 | 2 = 00000001 | 00000010 = 00000011 = 3
3 | 3 = 00000011 | 00000011 = 00000011 = 3
3 | 4 = 00000011 | 00000100 = 00000111 = 7
关于java - 为什么java int允许使用|运算符(operator) ?其评价如何?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16562739/
Confusion rose because of this post. The author updated his post, and the result became clear. Concl
假设我有以下语句: bool foo=true; if (foo){ foo=false; } else{ //do
关闭。这个问题是opinion-based .它目前不接受答案。 想要改进这个问题? 更新问题,以便 editing this post 可以用事实和引用来回答它. 关闭 9 年前。 Improve
我有一个表单,其中有很多设置页面。所有的页面都是一样的,所以我宁愿只制作一个表格,然后传入它应该编辑的设置的名称。我该怎么做?假设该表单称为“ConfigForm”,我希望能够用这样的方式调用它: n
简单问题: 我通过 javascript 使用 Youtube gdata 来:评论、回复和喜欢/不喜欢视频。到目前为止一切正常! 但是,我正在尝试允许用户特别喜欢和不喜欢评论(就像在本地 youtu
我在设置 TableView 中有一个单元格,我想将用户直接发送到 Appstore 并打开应用程序页面,以便他们可以发表评论。在 Stackoverflow 中有很多关于此的内容,但在 iOS8 和
快速提问 - 如标题所述。那可能吗?我认为以下端点是我最好的选择:https://developers.google.com/youtube/v3/docs/comments/update ,但找不到
我是一名优秀的程序员,十分优秀!