title: how can I solve Exception in thread "main" java.lang.NullPointerException
body: <p>I created two class</p>
  
  <p>but I have problem</p>
  
  <p>when I press run it is showing me this error</p>
  
  <pre><code>----jGRASP exec: java client
  
  Exception in thread "main" java.lang.NullPointerException
      at client.main(client.java:7)
  
  ----jGRASP wedge2: exit code for process is 1.
  ----jGRASP: operation complete.
  </code></pre>
  
  <p>Exception in thread "main" java.lang.NullPointerException &lt;&lt; I know what is this mean</p>
  
  <p>but I do not know how can I  correct my code !</p>
  
  <p>this is first class </p>
  
  <pre><code>class circle{
    private double radius;
    static int count=0;
      public circle(){
          radius=8.9;
      }
      public circle(double r){
          radius=r;
          count++;
      }
      public void setradius(double r){
          radius = r;
      }
      public double getradius(){
          return radius;
      }
      public double area (){
          double area1 = (radius*radius*(Math.PI));
          return area1;
      }
      public double circumference(){
          double circumference1 = (Math.PI)*radius;
          return circumference1;
      }
      public static double areas(double r){
          double area2 = (r*r*(Math.PI));
          return area2;
      }
  }
  </code></pre>
  
  <p>and this is the second one </p>
  
  <pre><code>class client{
  
     public static void main (String args[]){
        circle array[] = new circle [10];
            for (int i = 0 ; i&lt;10 ; i++){
              array [i]= new circle (i++);
              System.out.println("The area of the circle of radius "+ array[i].getradius()+"is" + array[i].area() + "and the circumference is" + array[i].circumference());
              System.out.println(circle.areas(35));
            }
      }
  }
  </code></pre>