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

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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!