take a look at the following code snipet does the exact opposite of the earlier code
public class IncrementTest
{
public static void main(
String[] args)
{
int i = 0 ;
i = ++i;
System.out.println(" The value of i is " +i );
i = ++i ;
System.out.println(" The value of i is " +i );
i = ++i ;
System.out.println(" The value of i is " +i );
}
}
o/p is :
----------
java ----------
The value of i is 1
The value of i is 2
The value of i is 3
thanks and regards ,
bhavesh