First code:
if(i==0) {// do instructions here}
Second code:
if(0==i) { // do instructions here }
What
no difference, some people prefer the second one to catch the common mistake of doing assignment (=) instead of equality test (==)
=
==
0 = i would fail at compilation
0 = i