问题详情

11. public void genNumbers() {  12. ArrayList numbers = new ArrayList();  13. for (int i=0; i<10; i++) {  14. int value = i * ((int) Math.random());  15. Integer intObj = new Integer(value);  16. numbers.add(intObj);  17. }  18. System.out.println(numbers);  19. }  Which line of code marks the earliest point that an object referenced by intObj becomes a candidate for garbage collection?() 


A、&ensp;Line&ensp;16

B、&ensp;Line&ensp;17

C、&ensp;Line&ensp;18

D、&ensp;Line&ensp;19

E、&ensp;The&ensp;object&ensp;is&ensp;NOT&ensp;a&ensp;candidate&ensp;for&ensp;garbage&ensp;collection.

时间:2021-07-20 00:02 关键词: SCJP程序员认证考试

答案解析

D
相关问题