Question: 2. Assume that Point class has the following method: public Point stairStep() { X++; y++ ; return this; } Also assume that a test class
2. Assume that Point class has the following method: public Point stairStep() { X++; y++ ; return this; } Also assume that a test class with a main method has the following statement: Point pl = new Point(9,5); Which of the following statements is valid? A. double a = pi.stairStep().getX(); B. double a = pi.stairStep(); C. Point c = stairStep (pl); D. Point c = pi.stairStep().getX()
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
