多项选择题
Which statements are true concerning the effect of the >> and >>> operators?()
A.For non-negative values of the left operand, the >> and >>> operators will have the same effect.
B.The result of (-1 >> 1) is 0.
C.The result of (-1 >>> 1) is -1.
D.The value returned by >>> will never be negative as long as the value of the right operand is equal to or greater than 1.
E.When using the >> operator, the leftmost bit of the bit representation of the resulting value will always be the same bit value as the leftmost bit of the bit representation of the left operand.
相关考题
-
多项选择题
Giventhefollowingclass,whichstatementscanbeinsertedatposition1withoutcausingthecodetofailcompilation?() publicclassQ6db8{ inta; intb=0; staticintc; publicvoidm(){ intd; inte=0; //Position1 } }
A.a++;
B.b++;
C.c++;
D.d++;
E.e++; -
单项选择题
If this source code is contained in a file called SmallProg.java, what command should be used to compile it using the JDK?() public class SmallProg { public static void main(String args[]) { System.out.println("Good luck!"); } }
A.java SmallProg
B.avac SmallProg
C.javac SmallProg.java
D.java SmallProg main -
单项选择题
HowdoobjectspassmessagesinJava?()
A.They pass messages by modifying each other’s member variables
B.They pass messages by modifying the static member variables of each other’s classes
C.They pass messages by calling each other’s instance member methods
D.They pass messages by calling static member methods of each other’s classes.
