public class Test2 {
int i = 0;
Test2(int i) {
this.i = i;
}
Test2 increament() {
i++;
return this;
}
void print() {
System.out.println("i = " + i);
}
public static void main(String[] args) {
Test2 t = new Test2(100);
t.increament().increament().print();
}
}