Câu 53: GSSP-Java: GIAC Secure Software Programmer-Java
You have the following code fragment of a Java program named test.12. public void getData(){13. ArrayList numbers=new ArrayList();14. for(int i=0; i<10;1++){15. int value=i*((int i) Math.random());16. Integer obj=new Integer(value);17. numbers.add(obj);18. }19. System.out.println(numbers);20. }On which of the followin…
Nội dung câu hỏi
You have the following code fragment of a Java program named test.12. public void getData(){13. ArrayList numbers=new ArrayList();14. for(int i=0; i<10;1++){15. int value=i*((int i) Math.random());16. Integer obj=new Integer(value);17. numbers.add(obj);18. }19. System.out.println(numbers);20. }On which of the following lines of code will the object referenced by obj be eligible for garbage collection?
Các lựa chọn
Đáp án được giữ gọn theo nhãn A, B, C, D trong phần bình chọn tương tác.
- A. Line 18
- B. Line 19
- C. Line 17
- D. Line 20 — đáp án hiện tại
Cộng đồng
0 bình luận công khai. Tên thành viên được ẩn một phần.