题目内容

Qi Baishi used the_____ of both Xieyi and Gongbi in his flower-and-bird paintings.

A. technology
B. technician
C. technique
D. approach

查看答案
更多问题

下面的说法,错误的是______。

A. 基类的引用可以指向派生类的对象
B. 基类的引用可以指向基类的对象
C. 派生类引用可以指向派生类的对象
D. 派生类引用可以指向基类的对象

下面的程序,运行结果是:主程序:public Class Test {public static void main(String args){A obj = new C();obj.hello();}}public class A {public void hello(){ System.out.println("Hello A");}public class B extends A{public void hello(){ System.out.println("Hello B");}public class C extends B{public void hello(){ System.out.println("Hello C");}

重写基类的方法时,建议加上@Override编译选项,以加强语法检查。

A. 对
B. 错

重写(Override)必须方法名与参数名与基类完全一致,否则会是子类的新方法。

A. 对
B. 错

答案查题题库