package p; //initialize in constructors class A{ private int i; /** * */ A() { i= 0; } void f(){ i++; } }