1 package tests.jfun.yan.xml;2 3 public class Counting {4 private static int c = 1;5 public static int count(int i){6 if(i!=c){7 throw new IllegalArgumentException (""+i+" expected, while at "+c);8 }9 return ++c;10 11 }12 13 }14