Not that it matters too much most of the time, but
you should always use ++i, not i++, in loops like this, because i++ implies just a tiny bit more work for the computer. ++i means "add one to the variable, and use the result", while i++ means "make a copy of the variable, increment the variable, and use the copy." In a very tight loop, making that copy can make a measurable difference (except when the vm is smart enough to realize the copy isn't needed, and optimizes it away.)