Java for-loop



examples/java/ForLoop.java
public class ForLoop  {
    public static void main(String[] args) {
        for (int i = 1; i <= 10; i++) {
            System.out.println(i);
        }
    }
}

$ javac ForLoop.java $ java ForLoop