classLine{11.publicstaticclassPoint{}12.}13.14.classTriangle{15.//insertcodehere16.}Whichcode,insertedatline15,createsaninstanceofthePointclassdefinedinLine?() A.Pointp=newPoint();B.Line.Pointp=newLine.Point();C.ThePointclasscannotbeinstatiatedatline15.D.Line1=newLine();1.Pointp=new1.Point();

classLine{11.publicstaticclassPoint{}12.}13.14.classTriangle{15.//insertcodehere16.}Whichcode,insertedatline15,createsaninstanceofthePointclassdefinedinLine?()

A.Pointp=newPoint();

B.Line.Pointp=newLine.Point();

C.ThePointclasscannotbeinstatiatedatline15.

D.Line1=newLine();1.Pointp=new1.Point();


相关考题:

Given:11.%12.request.setAttribute(vals,newString[]{1,2%12.request.setAttribute(vals,newString[]{1,2,3,4});13.request.setAttribute(index,2);14.%15.%--insertcodehere--%WhichthreeELexpressions,insertedatline15,arevalidandevaluateto3?()A.${vals.2}B.${vals[2]}C.${vals.index}D.${vals[index]}E.${vals}[index]F.${vals[vals[index-1]]}

Given:11.publicclassMyServletextendsHttpServlet{12.publicvoidservice(HttpServletRequestrequest,13.HttpServletResponseresponse)14.throwsServletException,IOException{15.//insertcodehere16.}17.}andthiselementinthewebapplication’sdeploymentdescriptor:error-pageerror-code302/error-codelocation/html/error.html/location/error-pageWhich,insertedatline15,causesthecontainertoredirectcontroltotheerror.htmlresource?()A.response.setError(302);B.response.sendError(302);C.response.setStatus(302);D.response.sendRedirect(302);E.response.sendErrorRedirect(302);

11.public class Counter{12.public static void main(String[]args){13.int numArgs=/*insert code here*/;14.}15.}and the command line:java Counter one fred 42 Which code,inserted at line 13,captures the number of arguments passed into the program?()A.args.countB.args.lengthC.args.count()D.args.length()E.args.getLength()

10.publicclassFooimplementsjava.io.Serializable{11.privateintx;12.publicintgetX(){returnx;}12.publicFoo(intx){this.x=x;}13.privatevoidwriteObject(ObjectOutputStreams)14.throwsIOException{15.//insertcodehere16.}17.}Whichcodefragment,insertedatline15,willallowFooobjectstobecorrectlyserializedanddeserialized?()A.s.writeInt(x);B.s.serialize(x);C.s.writeObject(x);D.s.defaultWriteObject();

10.classLine{11.publicclassPoint{publicintx,y;}12.publicPointgetPoint(){returnnewPoint();}13.}14.classTriangle{15.publicTriangle(){16.//insertcodehere17.}18.}Whichcode,insertedatline16,correctlyretrievesalocalinstanceofaPointobject?()A.Pointp=Line.getPoint();B.Line.Pointp=Line.getPoint();C.Pointp=(newLine()).getPoint();D.Line.Pointp=(newLine()).getPoint();

10.interfaceFoo{intbar();}11.publicclassSprite{12.publicintfubar(Foofoo){returnfoo.bar();}13.publicvoidtestFoo(){14.fubar(15.//insertcodehere16.);17.}18.}Whichcode,insertedatline15,allowstheclassSpritetocompile?()A.Foo{publicintbar(){return1;}}B.newFoo{publicintbar(){return1;}}C.newFoo(){publicintbar(){return1;}}D.newclassFoo{publicintbar(){return1;}}

classNav{11.publicenumDirection{NORTH,SOUTH,EAST,WEST}12.}13.publicclassSprite{14.//insertcodehere15.}Whichcode,insertedatline14,allowstheSpriteclasstocompile?() A.Directiond=NORTH;B.Nav.Directiond=NORTH;C.Directiond=Direction.NORTH;D.Nav.Directiond=Nav.Direction.NORTH;

Given:Which code, inserted at line 15, creates an instance of the Point class defined in Line?() A.Point p = new Point();B.Line.Point p = new Line.Point();C.The Point class cannot be instatiated at line 15.D.Line l = new Line() ; l.Point p = new l.Point();

Given:Which code, inserted at line 15, allows the class Sprite to compile?() A.Foo { public int bar() { return 1; }B.new Foo { public int bar() { return 1; }C.new Foo() { public int bar() { return 1; }D.new class Foo { public int bar() { return 1; }