KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > tests > jfun > yan > xml > Counting


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 JavaDoc(""+i+" expected, while at "+c);
8     }
9     return ++c;
10     
11   }
12
13 }
14
Popular Tags