im assuming you mean you want i to return the same value each time its called, not reset to 1.

in that case, just declare i like so instead of just int i = 1;

Code:
static int i = 1;