Lecture Videos
  1  public class TestCircleWithException {
  2    public static void main(String[] args) {
  3      try {
  4        CircleWithException c1 = new CircleWithException(5);
  5        CircleWithException c2 = new CircleWithException(-5);
  6        CircleWithException c3 = new CircleWithException(0);
  7      }
  8      catch (IllegalArgumentException ex) {
  9        System.out.println(ex);
 10      }
 11  
 12      System.out.println("Number of objects created: " +
 13        CircleWithException.getNumberOfObjects());
 14    }
 15  }