下列代码段的执行结果为( )。 public class BitOperator { public static void main(String args[ ]) { int a=-67,b=11

admin2012-12-13  34

问题 下列代码段的执行结果为(    )。    public class BitOperator    {      public static void main(String args[  ])      {          int a=-67,b=116,c=78,d;          d=~c>>2&(a|~B) ;          System.out.println ("d="+D) ;      }    }   

选项 A、d=70
B、d=67
C、d=78
D、d=116

答案1

解析 本题考查位运算符的使用。掌握了位运算符的使用后易得d的值为70。
转载请注明原文地址:https://kaotiyun.com/show/9R2p777K
0

最新回复(0)