black

Java认证考试综合练习

登录

单项选择题

class Work implements Runnable { 
Thread other;  
Work(Thread other) { this.other = other; } 
public void run() { 
try { other.join(); } catch (Exception e) { } 
System.out.print("after join "); 
} } 
class Launch { 
public static void main(String [] args) { 
new Thread(new Work(Thread.currentThread())).start(); 
System.out.print("after start "); 
} } 
结果为:()

A.after join
B.after start
C.after join after start
D.after start after join

相关考题

单项选择题 class Order3 implements Runnable {  public static void main(String [] args) {  new Thread(new Order3()).start();  for(int x = 0; x 〈 10; x++) System.out.print("m"); }  public void run() {  for(int x = 0; x 〈 10; x++) {  //insert code here  System.out.print("r");  }  }  }  和:  当代码被编译并照此运行时产生 "before" 的输出, 当下列内容插入到代码第8行时产生"after"输出  if (x 〉 3 && x 〈 7) Thread.yield();  对比“before”的输出结果和“after”的输出结果,下面哪一项是正确的?()

单项选择题 将GUI窗口中的组件按照从左到右如打字式排列的布局管理器是:()

单项选择题 import java.util.*;  class ScanStuff {  public static void main(String [] args) {  String s = "x,yy,123";  Scanner sc = new Scanner(s);  while (sc.hasNext())  System.out.print(sc.next() + " ");  }  }  结果是什么?()

All Rights Reserved 版权所有©求知题库网库(csqiuzhi.com)

备案号:湘ICP备14005140号-1

经营许可证号:湘B2-20140064