Consider the following simple java code
public static void main(string args[])
{
int x=10;
int y;
y=x++;
y=y--;
System.out.println(y);
}
here output is 10. but actually y variable decrements. but according to me output should be 9. what is the reason?