title: Why this CircleTest Class won't compile
body: <p>Consider the following two Java classes declared in the same package: Why won't the CircleTest Class compile and what changes can be made to make it work and the reasons for the changes. Please help me, thank you :). </p>
  
  <p>The errors when Compiling are: it says The CircleTest Class must be defined it its own file, circumf is not resolved is not a field, Circle.rad is not visible and PI is not resolved to a variable.</p>
  
  <pre><code>public class Circle {
     private double rad;
     static int count;
     public Circle(double radius) {
        this.rad = radius;
        count++;
     }
     double circumf() { return 2 * PI * rad; }
  }
  public class CircleTest {
     public static void main(String[] args) {
        Circle diskA = new Circle(5);
        Circle diskB = new Circle(3);
        Circle diskC = diskA;
        System.out.println("Circum A:" + diskA.circumf);
        System.out.println("Area B:" + PI*diskB.rad*diskB.rad);
     }
  }
  </code></pre>