Given: What is the result?()
A.2 B.3 C.4 D.6 E.7 F.Compilation fails.
单项选择题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; }
多项选择题Which two code fragments correctly create and initialize a static array of int elements?()
A. B. C. D.
单项选择题Click the Exhibit button. Which statement is true about the classes and interfaces in the exhibit?()
A.Compilation will succeed for all classes and interfaces. B.Compilation of class C will fail because of an error in line 2. C.Compilation of class C will fail because of an error in line 6. D.Compilation of class AImpl will fail because of an error in line 2.
单项选择题Given: What is the result?()
A.Afoo Afoo B.Afoo Bfoo C.Bfoo Afoo D.Bfoo Bfoo E.Compilation fails. F.An exception is thrown at runtime.
单项选择题Given: Which code, inserted at line 16, correctly retrieves a local instance of a Point object?()
A.Point p = Line.getPoint(); B.Line.Point p = Line.getPoint(); C.Point p = (new Line()).getPoint(); D.Line.Point p = (new Line()).getPoint();