会计考友 发表于 2012-8-4 12:33:16

2011年JAVA认证模拟题(49)

  Q145 Which of the following lines of output are displayed by the following program?
  class Question {
  public static void main(String args[])
  {
  MyThread t = new MyThread();
  t.displayOutput ( “ t has been
  created.”);
  t.start();
  }
  }
  class MyThread extend Thread {
  public void displayOutput (String s) {
  System.out.println(s);
  }
  public void run() {
  displayOutput (“t is running.”);
  }
  }
  A t has been created.
  B t is running.
  C The program will display different output depending on whether the underlying operating system supports preemptive scheduling or time slicing.
  D None of the above. The program does not compile.
  Q146 Which of the following extend the Collection interface?
  A Dictionary
  B List
  C Map
  D Set
  Q147 Which of the following are true?
  A Java only supports preemptive scheduling.
  B Java only supports time slicing.
  C The JVM has been implemented on operating systems that use time slicing.
  D The JVM has been implemented on operating systems that use preemptive scheduling.
  Q145 AB
  Q146 BD
  Q147 CD
页: [1]
查看完整版本: 2011年JAVA认证模拟题(49)