单项选择题
A.No output is produced. 123
B.No output is produced. 234
C.No output is produced. 1234
D.An exception is thrown at runtime. 123
E.An exception is thrown at runtime. 234
F.An exception is thrown at runtime. 1234
多项选择题 Which two are true?()
单项选择题 11.public void genNumbers(){ 12.ArrayList numbers=new ArrayList(); 13.for(inti=0;i 14.intvalue=i*((int)Math.random()); 15.IntegerintObj=newInteger(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 garbagec ollection?()
单项选择题 1.public class GC{ 2.private Objec to; 3.private void doSomethingElse(Object obj){o=obj;} 4.public void doSomething(){ 5.Object o=new Object(); 6.doSomethingElse(o); 7.o=new Object(); 8.doSomethingElse(null); 9.o=null; 10.} 11.} When the doSomething method is called,after which line does the Object created in line 5 become available for garbage collection?()