下面程序是关于类的继承的用法。阅读下面程序,根据程序中的注释在每一条横线处填写一个语句,使程序的功能完整,且运行程序后的输出结果为:
I am parentclass!
I am childclass!
I am childclass!
注意: 请勿改动main( )主方法和其他已有的语句内容,仅在下划线处填入适当的语句。
class Parent
void printMe( )
System.out.println("I am parentclass!");
class Child extends Parent
void printMe( )
System.out.println("I am childclass!");
void printAll( )
______________.printMe ( ); // 调用父类的方法
______________. printMe ( ); //调用本类的方法
printMe ( );
public class TestJieCheng
public static void main(String args[])
______________
myC.printAll( );
题库:计算机等级考试
类型:简答题
时间:2017-07-03 15:05:00
免费下载:《问答》Word试卷
下面程序是关于类的继承的用法。阅读下面程序,根据程序中的注释在每一条横线处填写一个语句,使程序的功能完整,且运行程序后的输出结果为:
I am parentclass!
I am childclass!
I am childclass!
注意: 请勿改动main( )主方法和其他已有的语句内容,仅在下划线处填入适当的语句。
class Parent
void printMe( )
System.out.println("I am parentclass!");
class Child extends Parent
void printMe( )
System.out.println("I am childclass!");
void printAll( )
______________.printMe ( ); // 调用父类的方法
______________. printMe ( ); //调用本类的方法
printMe ( );
public class TestJieCheng
public static void main(String args[])
______________
myC.printAll( );
本题关键词:面试程序,程序,工程施工程序,复苏程序,工作程序,建设程序,程序变更,程序冲突,点火程序,生产程序;