多选题 Given:
1. import java.util.*;
2. public class Analyzer {
3. static List<Exception> me;
4. Exception myEx;
5. public static void main(String[] args) {
6. Analyzer[] aa = {new Analyzer(), new Analyzer()};
7. me = new ArrayList<Exception>();
8. for(int i = 0; i < 2; i++) {
9. try {
10. if(i == 0) throw new Exception();
11. if(i == i) throw new MyException();
12. }
13. catch (Exception e) {
14. me.add(e);
15. aa[i] .myEx = e;
16. }
17. }
18. System.out.println(aa.length + " " + me.size());
19. aa = null; me = null;
20. // do more stuff
21. } }
22. class MyException extends Exception { }
When line 20 is reached, how many objects are eligible for garbage collection?
【正确答案】 D
【答案解析】