G

GIAC Secure Software Programmer – Java

273 Questions

You can start the exam to practice all questions related to this exam.

Question No. 1

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?
 

Choose the correct option from the given list.
01 / 273

0 Discussions

Trending Exams