All int variables are always less tha or equal to Integer.MAX_VALUE, which is defined as the highest int value. When i gets to Integer.MAX_VALUE andi s incremented, it silently wraps around to Integer.MIN_VALUE, thus the eternal loop.
Hmm.. You are right. Congratulation pegitha, you are careful.