For the same class what would a getter for the instance vari
For the same class
what would a getter for the instance variable x look like?
public double getX() {
 return p1.x;
 }
public double getX() {
 return x;
 }
public double getX(double newX) {
 x = newX;
 }
| public double getX() { | 
Solution
Answer:
public double getX() {
 return x;
 }
For this class, getter method looks lke above.

