package ex03;
public class NestedLoop {
public static void main(String[] args) {
for (int y = 0; y < 5; y++) {
for (int x = 0; x < 10; x++) {
System.out.print("*");
}
System.out.println("");
}
}
}
package ex03;
public class NestedLoop {
public static void main(String[] args) {
int y = 0;
while (y < 5) {
int x = 0;
y++;
while (x < 10) {
x++;
System.out.print("*");
}
System.out.println("");
}
}
}
Share article