单项选择题

Given:
2. abstract interface Pixie {
3. abstract void sprinkle();
4. static int dust = 3;
5. }
6. abstract class TinkerBell implements Pixie {
7. String fly() {return "flying "; }
8. }
9. public class ForReal extends TinkerBell {
10. public static void main(String[] args) {
11. new ForReal() .sprinkle();
12. }
13. public void sprinkle() {System.out.println(fly() + " " + dust);}
14. }
What is the result (Choose all that apply.)

A.flying 3
B.Compilation fails because TinkerBell doesn"t properly implement Pixie.
C.Compilation fails because ForReal doesn"t properly extend TinkerBell.
D.Compilation fails because Pixie is not a legal interface.
E.Compilation fails because ForReal doesn"t properly implement Pixie.
F.Compilation fails because TinkerBell is not a legal abstract class.
题目列表

你可能感兴趣的试题

微信扫码免费搜题