A.Pointp=newPoint();
B.Line.Pointp=newLine.Point();
C.ThePointclasscannotbeinstatiatedatline15.
D.Line1=newLine();1.Pointp=new1.Point();
第1题:
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();
第2题:
A.Directiond=NORTH;
B.Nav.Directiond=NORTH;
C.Directiond=Direction.NORTH;
D.Nav.Directiond=Nav.Direction.NORTH;
第3题:
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; }
第4题:
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;}}
第5题:
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();