我的课上有这行:
public class Line extends Figure
当我用这个命令编译时:
$ javac -cp :./stdlib.jar Line.java
,我得到这个错误:
Line.java:26: cannot find symbol
symbol : constructor Figure()
location: class Figure
public Line(double x0, double y0, double xn, double yn, Color initColor) {
-------------------------------------------------------------------------^
// the dashes above are supposed to be spaces, but I couldn't figure out how to format it correctly. The caret is actually there in that position
通常我会理解这个错误,但这次我不知道发生了什么。我的Figure.java
文件与我的Line.java
.