title: Calculating the area of a circle in Java
body: <p>I need to write a program to calculate the area of a circle and I seem to have everything right except when I run the program and input the values the area calculation comes up as zero.</p>
  
  <pre><code>public class Circle {
  
      private double radius;
      private double area;
  
      public Circle() {
          radius = 0;
          area = 0;
      }
  
      public Circle(double radius) {
          this.radius = radius;
      }
  
      public double getRadius() {
          return radius;
      }
  
      public void setRadius(double radius) {
          this.radius = radius;
      }
  
      public double getArea() {
          return area;
      }
  
      public void setArea(double area) {
          area = radius * radius * Math.PI;
      }
  
      public String toString() {
          return "The radius of the circle is: " + radius + ", and the area is: " + area;
      }
  }
  </code></pre>
  
  <p>What do I need to change so that when my test code calls the toString it will output a calculated area?</p>