I don't understand why i=i++ then i is equal to 0 either. Try
the following code:
public class Inc{
public static void main(String argv[]) {
Inc inc = new Inc();
int i = 0;
int j=0;
i = j ++;
//i=i++;
System.out.println("i ="+i+" j="+j);
}
}
The result is i=0, j=1.
This means the value of j is passed to i
and then j++; If this is true, in the case of i=i++, the value of i is first passed to i. Then i++; So finally, i is eaqual to
1.
[This message has been edited by bante (edited July 05, 2000).]