1、12345
12345
12345
2、
12345
12345
12345
<span style="font-size:14px;">public class Demo01 {
public static void main(String[] args) {
for(int i = 1;i <= 5; i++){
for (int j = 1; j < 6; j++) {
System.out.print(j);
}
System.out.println();
}
}
}
</span>
2、
11111
22222
33333
44444
55555
<span style="font-size:14px;">public class Demo02 {
public static void main(String[] args) {
for (int i = 1; i <= 5; i++) {
for (int j = 1; j <= 5; j++) {
System.out.print(i);
}
System.out.println();
}
}
}</sp