试题详情
单项选择题 10. class Line {  11. public class Point { public int x,y; }  12. public Point getPoint() { return new Point(); }  13. }  14. class Triangle {  15. public Triangle() {  16. // insert code here  17. }  18. }  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();

  • D
  • 关注下方微信公众号,在线模考后查看

热门试题