多选题
Given:
2. public class Salmon extends Thread {
3. public static long id;
4. public void run() {
5. for(int i = 0; i<4; i++) {
6. // insert code here
7. new Thread(new Salmon()) .start();
8. throw new Error();
9. }
10. System.out.print (i +" ");
11. } }
12. public static void main(String[] args) {
13. Thread t1 = new Salmon();
14. id = t1.getId();
15. t1.start ();
16. } }
And the two code fragments:
Ⅰ. if(i == 2 && id == Thread.currentThread().getId()) {
Ⅱ. if(i == 2) {
When inserting either fragment, independently at line 6, which are true? (Choose all that apply.)