多项选择题
Given:
Which two classes use the Shape class correctly?()
A.public class Circle implements Shape {private int radius;}
B.public abstract class Circle extends Shape {private int radius;}
C.public class Circle extends Shape {private int radius;public void draw();}
D.public abstract class Circle implements Shape { private int radius;public void draw();}
E.public class Circle extends Shape {private int radius;public void draw() {/* code here*/}}
相关考题
-
单项选择题
Given: What is the result?()
A.Compilation fails.
B.An exception is thrown at runtime.
C.The code executes normally and prints "foo".
D.The code executes normally, but nothing is printed. -
单项选择题
Given: Which statement is true?()
A.The output could be 5-1 6-1 6-2 5-2
B.The output could be 6-1 6-2 5-1 5-2
C.The output could be 6-1 5-2 6-2 5-1
D.The output could be 6-1 6-2 5-1 7-1 -
单项选择题
Click the Exhibit button. What is the output if the main() method is run?()
A.4
B.5
C.8
D.9
