单项选择题
能将程序补充完整的选项是 class Person { private int a; public int change(int m){return m; } } public class Teacher extends Person { public int b; public static void main(String arg[]) { Person p=new Person(); Teacher t=new Teacher(); int i; ______ } }
A.i=m
B.i=b
C.i=a
D.i=change(50)
点击查看答案&解析
<上一题
目录
下一题>
热门
试题
单项选择题
下面程序段的输出结果是 class Test{ public static void main(String args[]){ MyThread t=new MyThread(); t.displayOutput( t has been createD) ); t.start(); } } class MyThread extends Thread{ public void displayOutput(String s){ System.out.println(s); } public void run(){ displayOutput( t is running. ); } }
A.t has been create
B.t has been create t is runnin
C.t is runnin
D.编译出错
点击查看答案&解析
单项选择题
下面程序段的输出结果为 public class Test { public static void main(String args[]) { boolean a,b,c; a=(3<5); b=(a==true); System.out.println( a= +a+ b= +b); c=(b==false); System.out.println( b= +b+ c= +c); } }
A.a=true b=false b=true c=false
B.a=true b=false b=true c=true
C.a=true b=true b=true c=false
D.a=false b=false b=true c=false
点击查看答案&解析
相关试题
在面向对象的程序设计中,下列叙述中错误的...
下列组件不能添加进Frame主窗口的是
下列叙述中,正确的是
下列数据结构中,能用二分法进行查找的是
下列不属于虚拟机执行过程的特点的是