title: Beginner Java required no arguments error on constructor
body: <p>So as an assignment for a class i'm trying to make a simple circle class and then use it as an constructor.
  Here is my class code:</p>
  
  <pre><code>public class Circle
  {
    private double radius;
    private double pi;
  
    public void setRadius(double rad)
    {
      radius = rad;
    }
  
    public double getRadius()
    {
      return radius;
    }
  
    public double getArea()
    {
      return pi * radius * radius;
    }
  
    public double getDiameter()
    {
      return radius * 2;
    }
  
    public double getCircumference()
    {
      return 2 * pi * radius;
    }
  }
  </code></pre>
  
  <p>Here's the program that uses the class to make a constructor:</p>
  
  <pre><code>import java.util.Scanner; //scanner class for input
  
    public class CircleDemo
  {
    public static void main(String[]args)
    {
      double radiusIn; //gets radius from input
  
      Scanner keyboard=new Scanner(System.in); //activates scanner class in program
  
      System.out.print("Enter the radius of a circle: ");
      radiusIn=keyboard.nextDouble();
  
      Circle circularObject= new Circle(radiusIn);
  
      System.out.println("The circle's area is" + circularObject.getArea());
      System.out.println("The circle's diameter is" + circularObject.getDiameter());
      System.out.println("The circle's circumference is" + circularObject.getCircumference());
    }
  }
  </code></pre>
  
  <p>and i get the error:
  Error: constructor Circle in class Circle cannot be applied to given types;
    required: no arguments
    found: double
    reason: actual and formal argument lists differ in length</p>
  
  <p>I don't see anything wrong with my code, but then again i'm using the sample that my teacher gave us.</p>