多选题 Given:
2. public class Cult extends Thread {
3. static int count = 0;
4. public void run() {
5. for(int i = 0; i < 100; i++) {
6. if(i == 5 && count < 3) {
7. Thread t = new Cult(names[count++]);
8. t.start();
9. // insert code here
10. }
11. System.out.print(Thread.currentThread() .getName() + " ");
12. }
13. }
14. public static void main(String[] args) {
15. new Cult ("t0") .start();
16. }
17. Cult(String s) {super(s); }
18. String[] names = {"t1", "t2", "t3"};
19. }
And these two fragments:
Ⅰ. try {t.join(); } catch(Exception e) { }
Ⅱ. try {Thread.currentThread().join(); } catch(Exception e) { }
When each fragment is inserted independently at line 9, which are true? (Choose all that apply.)
【正确答案】 A、G
【答案解析】