Given:
3. public class Main { 4. public static void main(String[] args) { 5. MyClass h = new MyClass(); 6. Thread t1 = new Thread(h, "Java"); 7. Thread t2 = new Thread(h, "Jack"); 8. new Main().go(t2); 9. t1.start(); //from ww w . j a v a 2s. c o m 10. t2.start(); 11. } 12. void go(Thread t) { t.start(); } 13. } 14. class MyClass implements Runnable { 15. public void run() { 16. System.out.print(Thread.currentThread().getName() + " "); 17. } }
What is the result? (Choose all that apply.).
E and F are correct.
Line 10 will throw an exception because you can't start the same thread (in this case, t2) more than once.