1// you can use two types of increments
2int x = 0;
3//Postincrement
4System.out.println(x++); //this prints 0 because increments after execute print
5//Pretincrement // x = 1 and + 1 again is equal to 2 in the second print
6System.out.println(++x); // this prints 2 because increments before execute print