试题详情
多项选择题Which two code fragments will execute the method doStuff() in a separate thread?()

A、new Thread() {public void run() { doStuff(); }};

B、new Thread() {public void start() { doStuff(); }};

C、new Thread() {public void start() { doStuff(); }}.run();

D、new Thread() {public void run() { doStuff(); }}.start();

E、new Thread(new Runnable() {public void run() { doStuff(); }}).start();

  • D,E
  • 关注下方微信公众号,在线模考后查看

热门试题