网友您好, 请在下方输入框内输入要搜索的题目:
题目内容
(请给出正确答案)
publicclassX{publicobjectm(){objecto=newfloat(3.14F);objectoa=newobject[1];oa[0]=o;o=null;oa[0]=null;returno;}}Whenisthefloatobjectcreatedinline3,eligibleforgarbagecollection?()
A.Justafterline5.
B.Justafterline6.
C.Justafterline7.
D.Justafterline8(thatis,asthemethodreturns).
参考答案
更多 “ publicclassX{publicobjectm(){objecto=newfloat(3.14F);objectoa=newobject[1];oa[0]=o;o=null;oa[0]=null;returno;}}Whenisthefloatobjectcreatedinline3,eligibleforgarbagecollection?() A.Justafterline5.B.Justafterline6.C.Justafterline7.D.Justafterline8(thatis,asthemethodreturns). ” 相关考题
考题
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?()A.Line5B.Line6C.Line7D.Line8E.Line9F.Line10
考题
publicclassX{2.publicobjectm(){3.objecto=newfloat(3.14F);4.object[]oa=newobject[1];5.oa[0]=o;6.o=null;7.oa[0]=null;10.returno;9.}10.}Whenisthefloatobjectcreatedinline3,eligibleforgarbagecollection?()
A.Justafterline5.B.Justafterline6.C.Justafterline7.D.Justafterline8(thatis,asthemethodreturns).
考题
publicclassX(2.publicobjectm(){3.objecto=newfloat(3.14F);4.object[]oa=newobject[1];5.oa[0]=o;6.o=null;7.returnoa[0];8.}9.}Whenisthefloatobjectcreatedinline3,eligibleforgarbagecollection?()
A.Justafterline5B.Justafterline6C.Justafterline7(thatis,asthemethodreturns)D.Neverinthismethod.
考题
publicObjectm(){11.Objecto=newFloat(3.14F);12.Object[]oa=newObject[1];13.oa[0]=o;14.o=null;15.returnoa[0];16.}WhenistheFloatobject,createdinline11,eligibleforgarbagecollection?()
A.Justafterline13.B.Justafterline14.C.Neverinthismethod.D.Justafterline15(thatis,asthemethodreturns).
考题
publicclassX{publicobjectm(){objecto=newfloat(3.14F);objectoa=newobject[1];oa[0]=o;o=null;returnoa[0];}}Whenisthefloatobjectcreatedinline3,eligibleforgarbagecollection?()
A.Justafterline5B.Justafterline6C.Justafterline7(thatis,asthemethodreturns)D.Neverinthismethod.
考题
return o; O是代表什么呢?如果不返回O 会怎么样?
friendostreamoperator(ostreamVectori=0;iv.size;i++){ov.data[i]'';}returno;}
考题
下面的程序会抛出什么异常类型? public class Test { public static void main(String[] args) { Object o = null; System.out.println(o); } }A.ArithmeticExceptionB.ArrayIndexOutOfBoundsExceptionC.StringIndexOutOfBoundsExceptionD.没有异常
考题
下面的程序会抛出什么异常类型? public class Test { public static void main(String[] args) { Object o = null; System.out.println(o.toString()); } }A.ArrayIndexOutOfBoundsExceptionB.StringIndexOutOfBoundsExceptionC.ClassCastExceptionD.NullPointerException
热门标签
最新试卷