When I try to create a new instance of the class Point
Point nir = new Point(double x, double y);
I'm getting the error
Multiple markers at this line
- x cannot be resolved to a variable
- y cannot be resolved to a variable
How come? I want x and y to be general, not specific. I want to include my Point as a field of a new class.
EDIT:
In a given class named Circle I want to replace the fields x0 and y0, that represent the coordinates of a point, with an object of type Point. So this is the begining of the class Circle that I want to refactor as above:
public class Circle {
private double x0, y0, radius;
So, I basically want to change the representation of x0, y0 to Point structure.