Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

nested for loop java


public class Sample {
    public static void main(String[] args) {

        for (int x = 0; x < 5; x++) {
            for (int y = 0; y < 5; y++) {
                System.out.println(y);
            }
            System.out.println();
        }
    }
}
 
PREVIOUS NEXT
Tagged: #nested #loop #java
ADD COMMENT
Topic
Name
2+7 =