public class example0 {
  public static int doit(int a) {
    if (a<0) {
      throw new IllegalArgumentException("a must be non-negative; not " +
					 "a=" + a);
    }
    return a+1;
  }

  public static void main(String[] args) {
    System.out.println("doit(3)=" + doit(3));
    System.out.println("doit(-3)=" + doit(-3));
  }
}
