构造函数 Point(double, double) 未定义

constructor Point(double, double) is undefined

当我构建这个方法时,我得到构造函数 Point(double, double) is undefined。但是当我键入变量 delta、deltaX、deltaY 时,错误消失了。我在这里做错了什么?我在此行 class 中导入了 Point 库,并且我所有的 setter 和 getter 也都设置为双精度。

public Point solve(Line line2)
{
    double delta = this.a * line2.getB() - this.b * line2.getA();
    double deltaX = this.c * line2.getB() - this.b * line2.getC();
    double deltaY = this.a * line2.getC() - this.c * line2.getA();
    
    return new Point(deltaX/delta, deltaY/delta);
    
}

Point 只有 intPoint 构造函数。

Point2D.Double 可能会如你所愿。