单选题
Java
2019-03-04
阅读下列代码:
public class Test{
public static void main(String args[]){
System.out.println(89>>1);
}
}
其运行结果是( )。
A.44
A.44
B.45
B.45
C.88
C.88
D.90
D.90
参考答案
A
答案解析
算术右移:>>,用来将一个数的二进制位序列右移若干位。规则是:低位舍弃,高位补入原来高位的值,右移一位相当于除2取商。89除以2,商是44。所以89>>1的结果是44。
你可能感兴趣的试题
A.4.0,36.0
A.4.0,36.0
B.3.0,40.0
B.3.0,40.0
C.3.0,36.0
C.3.0,36.0
D.4.0,40.0
D.4.0,40.0
A.show one
A.show one
B.show two
B.show two
C.show three
C.show three
D.show four
D.show four

