Free help with homework

Why join Brainly?

  • ask questions about your assignment
  • get answers with explanations
  • find similar questions

I am a beginner in bluej programming.I have just typed a progarm of finding area and circumference of a circle but I am getting an error saying "missing

method body or declare abstract".Please explain what does it mean and please give me the correction I need to do in my program.Here's my program:
public class circle
public void getArea()
double radius=2.5;

double area=Math.PI*radius*radius;
double circumference=2*Math.PI*radius;
System.out.println("The area of the circle is "+area);
System.out.println("Its circumference is "+circumference);


You can try this class qwerty { public static void main (String arts[ ]) . . .//declare variables assign values using 3.14 for π ,do simple multiplication then print } } That will work ,unless u have a very outdated version
0 0 0
but in the question its given that I have to use pi as it is,that is ,I dont have to convert it into 3.14.So please can u give me the correct code for that
The Brain
  • The Brain
  • Helper
Not sure about the answer?
Learn more with Brainly!
Having trouble with your homework?
Get free help!
  • 80% of questions are answered in under 10 minutes
  • Answers come with explanations, so that you can learn
  • Answer quality is ensured by our experts