different types of for loops explained hjava code example
Example 1: for loop java
for (int i = 0; i < 5; i++) {
System.out.println(i);
}
Example 2: java loop
for (int i = 0; i < 10; i++) {
System.out.println(i);
}
for (int i = 0; i < 5; i++) {
System.out.println(i);
}
for (int i = 0; i < 10; i++) {
System.out.println(i);
}