单项选择题
能将程序补充完整的选项是 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)
点击查看答案&解析
<上一题
目录
下一题>
热门
试题
单项选择题
下面程序段的输出结果为 public class Test { public static void main(String args[]) { boolean a,b,c; a=(3<5); b=(a==true); System.out.printin( a= +a+ b= +b) ; c-(b==false); System.out.println(b= +b+ e= +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
点击查看答案&解析
单项选择题
下面程序段的输出结果是 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 nm(){ displayOutput( t is running. ); }
A.t has been create t is runnin
B.t has been create
C.t is runnin
D.编译出错
点击查看答案&解析
相关试题
下面程序段的输出结果是 public class T...
下面程序段的输出结果是 public class T...