题目内容

关于下列代码编译或执行结果的描述中,正确的是( )。 public class Test public static void main(String args[]) TestThread pm1=new TestThread("One") pm1.start(); TestThread pm2=new TestThread("Two") pm2.start(); class TestTbread 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.print(sTname+"");

A. 不能通过编译,TestThread类中不能定义变量和构造方法
B. 输出One One Two Two
C. 输出Two One One Two
D. 选项B或C都有可能出现

查看答案
更多问题

使用所给的形容词或副词完成句子。 It will take ______ to go to Beijing than to Tokyo. (long)

There are much thousand foreign tutors in Seoul.

填入合适的词完成句子。 This room is large ______ to stay altogether.

It is necessary that all employees will attend the seminar.

答案查题题库