多项选择题
Given the following class, which statements can be inserted at position 1 without causing the code to fail compilation?()
public class Q6db8 {
int a;
int b = 0;
static int c;
public void m() {
int d;
int e = 0;
// Position 1
}
}
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. -
多项选择题
Given that Thing is a class, how many objects and reference variables are created by the following code?() Thing item, stuff; item = new Thing(); Thing entity = new Thing();
A.One object is created
B.Two objects are created
C.Three objects are created
D.One reference variable is created
E.Two reference variables are created
F.Three reference variables are created.
