欢迎来到易学考试网 易学考试官网
全部科目 > Java认证考试 > Java认证考试综合练习

单项选择题

现有: 
5.  class Order2 implements Runnable  {    
6.    public void run()  {    
7. for (int x- o;  x<4;  x++)  { 
8. try{Thread.sleep(100);  )catch  (Exception e)  {  }    
9.    System.out.print("r");    
10.    }  } 
11.    public static void main(string  []  args)  {    
12.    Thread t=new Thread(new order2());    
13.    t.start(); 
14.    for(int x=0;  x<4;  x++)  {    
15.    //insert code here    
16.    System.out.print("m");    
17.  }  }  } 
哪一个插入到第15行,最有可能产生输出 rmrmrmrm?()     

    A.  Thread.sleep(1);
    B.  Thread.sleep(100);
    C.  Thread.sleep(1000);
    D.  try{  Thread.sleep(1);  )  catch  (Exception e)  {  }
    E.  try{Thread.sleep(100);  )  catch  (Exception  e)  {  }
    F.  try{Thread.sleep(1000);  )  catch  (Exception  e)  { }

点击查看答案&解析

相关考题

微信小程序免费搜题
微信扫一扫,加关注免费搜题

微信扫一扫,加关注免费搜题