说我有以下两个课程:
package MyShape;
public abstract class Shapeclass {
public abstract double area(double radius);
protected void print(double area) {
System.out.print("Area is:" + area);
}
}
还有另一个类 Triangle ;
package MyShape;
public class Triangle extends Shapeclass {
double area;
public double area(double radius) {
return radius * radius;
}
public void print() {
super.print(area);
}
}
我已将两个类放在名为 MyShape 的同一文件夹中但是当我尝试编译 Triangle 类编译器时显示以下错误;
C:\Users\Desktop\MyShape\Triangle.java:3: error: cannot find symbol
public class Triangle extends Shapeclass
^
symbol: class Shapeclass
C:\Users\Desktop\MyShape\Triangle.java:13: error: cannot find symbol
super.print(area);
^
symbol: variable super
location: class Triangle
请帮我解决?从过去的几个小时开始我就一直在想它。