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?

Your error message should also indicate which method does not exist. Which one is it complaining about?

Exception in thread "main" java.lang.NoSuchMethodError:main

this is the error which I am getting

There is your problem. You can't execute all three because testcircle is the only one with a main method. On top of that, I don't think you can execute more than one class at once with the java command. Just change it to java testcircle

Yeah, no problem. Ezzaral basically handed me the easy solution though. :p Mark the thread as solved. . ? (I haven't solved one in a good while. . lol)

This question has already been answered. Start a new discussion instead.