多重循环中for语句的循环条件为啥不能用j==i
for (int i = 1; i<=3; i++) {
for (int j = 1; j<=i;j++ ) {
System.out.print("*");
}
System.out.println();
}
请问第二句为啥不能是for (int j = 1; j==i;j++ ) 呢?
for (int i = 1; i<=3; i++) {
for (int j = 1; j<=i;j++ ) {
System.out.print("*");
}
System.out.println();
}
请问第二句为啥不能是for (int j = 1; j==i;j++ ) 呢?
2016-10-21
举报