单项选择题

能将程序补充完整的选项是 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.编译出错
相关试题
  • 一个类只有实现了 【14】 接口,它的对...
  • 请将程序补充完整。import java.awt.*...
  • sum的值为0,则result=sum==01:num...
  • 使得线程放弃当前分得的CPU时间,但不使线...
  • 关于文件名的处理中,测试当前文件是否目录...