このループである種の間違いを犯しましたが、本当にそれを理解できません。ループは次のとおりです。
while (true) {
System.out.print(stepName[currentTick]);
for(int i = stepName[currentTick].length() - longestNameInt; i == 0; i--)
System.out.print(" ");
System.out.print(" [");
double percentCalc = (double) stepPercent[currentTick];
int slotsRep = (int) Math.round((percentCalc * 0.2));
for(int i = slotsRep; i == 0; i--)
System.out.print("*");
for(int i = 20 - slotsRep; i == 0; i--)
System.out.print(" ");
System.out.print("] " + stepPercent[currentTick] + "% \r");
if(currentTick == totalTicks)
break;
Thread.sleep(stepTime[currentTick]);
}
基本的には「(First stepname) [*] 0%」とどんどん出力していきます。当たり前のことで申し訳ありませんが、私は初心者です。:)
PS私のクラスがもっと必要かどうか私に尋ねてください.