Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
問題は次のように述べています。 ) ループ、空の System.out.println() で行を終了します。"
int x =1; for (char y = 'c'; y>=2 && y<=7; y++) { System.out.println(y); x++; } System.out.println();
文字は文字と直接比較できます。これは文字列には当てはまりません。
for(char y = 'c'; y <= 'h'; y++){ System.out.print(y); } System.out.println();
次の指示により、println を print に変更しました。
System.out.print() で毎回文字ループカウンターを出力する