网友您好, 请在下方输入框内输入要搜索的题目:
题目内容
(请给出正确答案)
关于下列代码编译或执行结果的描述中,正确的是( )。
A.不能通过编译,TestThread类中不能定义变量和构造方法
B.输出One One Two TWO
C.输出Two One One Two
D.选项B或c都有可能出现
参考答案
更多 “ 关于下列代码编译或执行结果的描述中,正确的是( )。A.不能通过编译,TestThread类中不能定义变量和构造方法B.输出One One Two TWOC.输出Two One One TwoD.选项B或c都有可能出现 ” 相关考题
考题
关于下列代码编译或执行结果的描述中,正确是______。public class Test{public static void main(String args[]){TestThread pm1=new TestThread("one");pm1.start();TestThread pm2=new TestThread("Tow");pm2.start();}}class TestThread extends Thread(private String sTname="";TestThread(String s){sTname=s;}public void run(){for(int i=0;i<2;i++){try{sleep(1000);}catch(InterruptedException e)()System.out.println(sTname+…);}}}A) 不能通过编译,TestThread类中不能定义变量和构造方法B) 输出One One Two TwoC) 输出Tow One One TwoD) 选项B或C都可能出现A.B.C.D.
考题
( 10 )执行下列程序,显示的结果是 【 10 】 。one= "WORK"two = ""a = LEN ( one )i = aDO WHILE i=1two = two + SUBSTR ( one ,i , 1 )i=i - 1ENDDO? two
考题
编译和执行以下代码,输出结果是( )。 int i=1; switch (i) { case 0: System.out.print("zero,"); break; case 1: System.out.print("one,"); case 2: System.out.print("two,"); default: System.out.println("default"); }A.one,B.one,two,C.one,two,defaultD.default
考题
以下对枚举类型名的定义中正确的是______。A.enum a={one,two,three};B.enum a{one=9,two=-1,three};C.enum a={"one","two","three"};D.enum a{"one","two","three"};
考题
关于下列代码编译或执行结果的描述中,正确的是( )。 public class Test{ public static void main(String argsE]){ TcstThread pml=new TestThread("One") pml.start; TestThread pm2=new TestThread("Tw0") pm2.start; } } class TestThread extends Thread( private String sTname=""; TestThread(String s){ sTname=s; } public void run{ for(int i=O;i2;i++){ try{ sleep(1000); }catch(InterruptedException e){} system.out.print(sTname+""); } } }A.不能通过编译,TestThread类中不能定义变量和构造方法B.输出One One Two TwoC.输出Two One One TwoD.选项B或C都有可能出现
考题
以下对枚举类型名的定义中正确的是______。A.enum a={one, two,three};B.enum a{one=9,two=1,three};C.enum a={"one","two","three"};D.enum a{"one", "two","three"};
考题
以下对枚举类型名的定义中正确的是 ( )A.enuma={one,two,three};B.enuma{one=9,two=-1,three};C.enum a={"one" "two","three"};D.enum a{"one","two","three"};
考题
下列选项中,不能创建字典对象的语句是()。A.{'one':1, 'two':2, 'three':3}B.dict('one':1, 'two':2, 'three':3)C.dict([('one',1), ('two',2), ('three',3)])D.dict(zip(['one','two','three'], [1,2,3]))
考题
4、下列选项中,不能创建字典对象的语句是()。A.{'one':1, 'two':2, 'three':3}B.dict('one':1, 'two':2, 'three':3)C.dict([('one',1), ('two',2), ('three',3)])D.dict(zip(['one','two','three'], [1,2,3]))
热门标签
最新试卷