单项选择题
能将程序补充完整的选项是
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=p.a
D.i=p.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 created.
B.t has been created.
t is running.
C.t is running.
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
点击查看答案&解析
相关试题
执行下列程序时,会产生什么异常 public ...
阅读下列代码后 public class Person i...
下列程序的输出结果是 class Test publi...
下面程序段的输出结果为 public class T...
下面程序段的输出结果是 class Test pub...