11, because even it is post increment, it will increment by 1 when it is going to reach println() statment, for the first statement(i++;) it wont increment, after completing the execution of this method i incremented by 1 and prints the result.
Yes this is similar totemp = i;i = i+1;i = temp;It will restore the value 10 since post increment. If its pre-increment last assignment will be i = temp+1