>@質問者さん
変数iやIをメソッドで使うか使わないかではなく、for文自体がfor ( [ForInit] ; [Expression] ; [ForUpdate] ) Statement
となっていて、式(Expression)の部分が空である場合、trueとして扱うのがプログラミング言語Javaの仕様であり、結果的に無限ループになるから、なのです。
[Java Language Specification]
https://docs.oracle.com/javase/specs/jls/se15/html/jls-14.html#jls-BasicForStatement
から抜粋:
> 14.14.1.2. Iteration of for Statement
> If the Expression is not present, or it is present and the value resulting from its evaluation (including any possible unboxing) is true, then the contained Statement is executed.
2021/02/11 05:24
2021/02/11 05:46
2021/02/11 08:04