01
02
03
04
05
06
07
package singleton.staticClass;
public class S {
  static private int i;

  private S() {}
  static public int inc() { return i++; }
}