Howdy Shakunthala!
One of your first posts, what?
Welcome to the ranch!
your problem of understanding seems to be in the second line of these:
int i = 0;
i = i++ + m(i);
System.out.print(i);
this combined operations are evaluated from left to right, so first
now m runs with the argument 1.
It first prints this 1 (first output is one and the comma)
and returns 0.
The 0 is added to the "old" i (still 0) so i = 0 + 0 = 0
And this is the second output (zero).
Note that always
i=i++;
will never change the value of i, but in between there is a hidden copy of i that is one higher, but after the line it will be lost.
Phew!
Yours,
Bu.