While going through some mock exams I came across the following question in Naveen's Javaprepare.com test
according to the test the answer is 2, but when I run this in MyEclipse the answer comes back as 0.
if I change the i=i++ to i++ the answer comes out as 2.
I guess my question is does i= in front of the i++ affect the outcome or not?
My thought is that the first time through the loop on the line i=i++ i would be = 0 but the next line i would be incremented to 1 and then similar for the second time through i should be equal to 2