Need comments added to the following java code:
public class Point {
private double x;
private double y;
private String type;
public void setXY(double xx, double yy) {
x = xx;
y = yy;
}
public double getY() {
return y;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public double[] getDimensions() {
return new double[] { x, y };
}
public String toString() {
return "Point [" + x + ", " + y + "] is " + type;
}
}