Section: For loop
Basic for loop
java
java
for (int i = 0; i < 5; i++) {\n System.out.println(i);\n}Explanation
Classic counted loop. Great when you need an index.
Learn the surrounding workflow
Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.
Related commands
Same sheet · prioritizing For loop