Respeted Sir/Madam,
We have a doubt in the following code:-
class Sample
{
public static void main(
String args[])
{
int i=10;
i=i++;
System.out.println("The value of i is: " + i);
}
}
When I run the program,it is giving the output as 10.
Why so?If I store the result in another variable,it is taking as 11.What is the difference between both the cases?
Thanking you,
M.Sanjay.