多做题,通过考试没问题!

Java认证考试

睦霖题库>其他计算机考试>Java认证考试

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
答案解析:
进入题库查看解析

微信扫一扫手机做题