I\'ve made a loop with i as it\'s counter variable.
Inside that loop I\'m comparing cells of an array.
I\'m wondering what\'s the difference between array[i++] (or a
i++, ++i, and i+1 are all different expressions (or operations). You should consult your favourite Java reference to learn about the difference.
(In short: i++ increments i but returns the original value, ++i increments i and returns the new value, i+1 does not increment i but returns the value of i+1.)
As to why exactly your loop does not work the way you expect it to: this can not be answered without actually seeing your code—quite logical. My assumption would be that you either used the expressions wrong and/or that you incremented i twice per loop.