Given:
2. public class Main extends Thread { 3. public static void main(String[] args) { 4. try { //from ww w . j a v a 2 s .com 5. Thread t = new Thread(new Main()); 6. t.start(); 7. t.start(); 8. } catch (Exception e) { System.out.print("e "); } 9. } 10. public void run() { 11. for(int i = 0; i < 2; i++) 12. System.out.print(Thread.currentThread().getName() + " "); 13. } }
Which are true? (Choose all that apply.)
C and D are correct.
When you attempt to invoke start()
on the same thread more than once, an exception is thrown and a second thread is NOT started.
That exception doesn't keep the first thread from completing.