public abstract class CircleShape {
public double radius;
public CircleShape(){}
public CircleShape(double radius) {
this.radius=radius;
}
public void setradius(double radius){
this.radius=radius;
}
public String toString()
{
return "radius"+ radius;
}
abstract String getDisplayText();
}
public class circle extends CircleShape{
private double area;
public double area()
{
return radius*radius*3.14;
}
public String getDisplayText()
{
return super.toString() + area;
}
}
public class testcircle{
public static void main(String[] args){
circle myCircle = new circle();
myCircle.setradius(5.0);
System.out.println(myCircle.getDisplayText());
}
}
I am getting this error while executing:
exception in thread "main" java.lang.NoSuchMethodError
where am i going wrong?