问题详情

下列代码的输出结果是( )。

class parent

{

void printme()

{

System.out.println("parent");

}

}

class child extends parent

{

void printme()

{

System. out.println("child");

}

void printall()

{

super, printme();

this.printme();

printme();

}

}

public class test

{

public static void main(String args[])

{

child myc=new child();

myc.printall();

}

}

A.import java.awt.*;

B.import java.applet.applet;

C.import java.io.*;

D.import java, awt.graphics;

未搜索到的试题可在搜索页快速提交,您可在会员中心"提交的题"快速查看答案。 收藏该题
查看答案

相关问题推荐

若要把类FriendClass定义为类MyClass的友元类,则应在类MyClass的定义中加入语句【】。

fstream、ifstream和ofstream文件流类的成员函数______关闭文件。

模块级变量的声明关键字是Dim或______。

设窗体上有一个名为Text1的文本框和一个名为Command1的命令按钮,并有以下事件过程: Private Sub Command1 Click( ) X!=Val(Text1.Text) Select Casc x Case Is<-10,Is>=20 Print"输入错误" Case Is<0 Print 20-x Case Is<10 Print 20 Case Is<=20 Print x+10 End Seleet End Sub 程序运行时,如果在文本框中输入-5,则单击命令按钮后的输出结果是( )。

A.5

B.20

C.25

D.输入错误

在菜单设计的“常规选项”对话框中,用户可以设置代码和【】。

联系客服 会员中心
TOP