多项选择题
A. Inheritance represents an is-a relationship.
B. Inheritance represents a has-a relationship.
C. Interfaces must be used when creating a has-a relationship.
D. Instance variables can be used when creating a has-a relationship.
多项选择题 Whichfouraretrue?()
多项选择题 public class Team extends java.util.LinkedList { public void addPlayer(Player p) { add(p); } public void compete(Team opponent) { /* more code here */ } } class Player { /* more code here */ } Which two are true?()
单项选择题 10. public class SuperCaic { 11. protected static int multiply(int a, int b) { return a * b; } 12. } and: 20. public class SubCalc extends SuperCalc { 21. public static int multiply(int a, int b) { 22. int c = super.multiply(a, b); 23. return c; 24. } 25. } and: 30. SubCalc sc = new SubCalc(); 31. System.out.println(sc.multiply(3,4)); 32. System.out.println(SubCalc.multiply(2,2)); What is the result?()