Given: Which code, inserted at line 14, allows the Sprite class to compile?()
A.Direction d = NORTH; B.Nav.Direction d = NORTH; C.Direction d = Direction.NORTH; D.Nav.Direction d = 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 statement is true?()
A.The code will compile without changes. B.The code will compile if public Tree() { Plant(); } is added to the Tree class. C.The code will compile if public Plant() { Tree(); } is added to the Plant class. D.The code will compile if public Plant() { this("fern"); } is added to the Plant class. E.The code will compile if public Plant() { Plant("fern"); } is added to the Plant class.
单项选择题Click the Exhibit button. Given: ClassA a = new ClassA(); a.methodA(); What is the result? ()
A.Compilation fails. B.ClassC is displayed. C.The code runs with no output. D.An exception is thrown at runtime.
单项选择题Given: What is the result?()
A.harrier B.shepherd C.retriever D.Compilation fails. E.retriever harrier F.An exception is thrown at runtime.
单项选择题Given: If some sort of exception is thrown at line 34, which output is possible?()
A.a B.b C.c D.ac E.abc