A.sb1.append("abc"); s1.append("abc");
B.sb1.append("abc"); s1.concat("abc");
C.sb1.concat("abc"); s1.append("abc");
D.sb1.concat("abc"); s1.concat("abc");
E.sb1.append("abc"); s1 = s1.concat("abc");
F.sb1.concat("abc"); s1 = s1.concat("abc");
G.sb1.append("abc"); s1 = s1 + s1.concat("abc");
H.sb1.concat("abc"); s1 = s1 + s1.concat("abc");
第1题:
Given:11.publicvoidgenNumbers(){12.ArrayListnumbers=newArrayList();13.for(inti=0;i<10;i++){14.intvalue=i*((int)Math.random());15.IntegerintObj=newInteger(value);16.numbers.add(intObj);17.}18.System.out.println(numbers);19.}WhichlineofcodemarkstheearliestpointthatanobjectreferencedbyintObjbecomesacandidateforgarbagecollection?()
A.Line19
B.TheobjectisNOTacandidateforgarbagecollection.
C.Line17
D.Line16
E.Line18
第2题:
A.Point p = Line.getPoint();
B.Line.Point p = Line.getPoint();
C.Point p = (new Line()).getPoint();
D.Line.Point p = (new Line()).getPoint();
第3题:
A.Line35willnotcompile.
B.Line36willnotcompile.
C.Line37willnotcompile.
D.Line38willnotcompile.
第4题:
A.Line4ofclassTargetcanbechangedtoreturni++;
B.Line2ofclassTargetcanbechangedtoprivateinti=1;
C.Line3ofclassTargetcanbechangedtoprivateintaddOne(){
D.Line2ofclassTargetcanbechangedtoprivateIntegeri=0;
第5题:
A.Line92willnotexecute.
B.Theconnectionwillnotberetrievedinline85.
C.Theresourceconnectionwillnotbeclosedonline88.
D.Theenclosingmethodwillthrowanexceptiontoitscaller.
第6题: