下面选项中,能够实现子类继承父类的是()。
A: class Son extends Father{}
B: class Son call Father{}
C: class Son super Father{}
D: class Son in Father{}
A: class Son extends Father{}
B: class Son call Father{}
C: class Son super Father{}
D: class Son in Father{}
举一反三
- 以下哪个方法不可以加入类Son? class Father{public ...on extends Father{…}
- 以下哪个方法不可以加入类Son? class Father{ public void methodOne(int i){} public void methodTwo(int i){} public static void methodTree(int i){} public static void methodFour(int i){} } class Son extends Father{…}
- 下列代码输出为( ): class Father{ public void F() { Console.Write("A.F"); } public virtual void G() { Console.Write("A.G"); } } class Son: Father{ new public void F() { Console.Write("B.F"); } public override void G() { Console.Write("B.G"); } } class override_new{ static void Main() { Son b = new Son(); Father a = b; a.F(); b.F(); a.G(); b.G(); } }
- (7-1)定义了如下 的Father类和Derived类,则下面( )语句是正确的。 abstract class Father { public abstract void call(); } class Derived extends Father { public void call() { } }
- After the father took the son to have a hair cut, the son never talked to his father willingly.