

MCQOPTIONS
Saved Bookmarks
1. |
Which of these will create and start this thread?
public class MyRunnable implements Runnable { public void run() { // some code here } } |
A. | New Runnable(MyRunnable).start(); |
B. | New Thread(MyRunnable).run(); |
C. | New Thread(new MyRunnable()).start(); |
D. | New MyRunnable().start(); |
Answer» D. New MyRunnable().start(); | |