L4.4: Nested If, For Loop

PHOTO EMBED

Tue Oct 17 2023 08:30:55 GMT+0000 (Coordinated Universal Time)

Saved by @testpro #java

package org.example;
public class Main {
    public static void main(String[] args) {

        for (int i = 0; i < 5; i++) {

            if (i == 3) {
                System.out.println("The value of i is " +i );
            }

        }
    }
}
// Output: The value of i is 3
content_copyCOPY