Aliensbrain
  • Home
  • Topics
  • Quizzes
  • Notebooks
  • Community
  • Sign in
  • programming languages Online Quiz - 194
  • class Line { Line 1. public class Point { public int x,y; } ...

class Line { Line 1. public class Point { public int x,y; } Line 2. public Point getPoint() { return new Point(); } Line 3. } Line 4. class Triangle { Line 5. public Triangle() { Line 6. // insert code here Line 7. } 18. } Which code, inserted at line Line 6, 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();

technology programming languages
  1. A

  2. B

  3. C

  4. D


Show answer
Correct Option: D

Find more quizzes:

© Aliensbrain | all rights reserved
  • About
  • Contact
  • Terms and Condition
  • Privacy Policy