Example:
public class Integers { public static void main(String[] arguments) { int N; // integer variable declaration for (N = 1; N <= 4; N++) { // for loop execution System.out.println(N); } } }
Output:
1 2 3 4
public class Integers { public static void main(String[] arguments) { int N; // integer variable declaration for (N = 1; N <= 4; N++) { // for loop execution System.out.println(N); } } }
Output:
1 2 3 4