一、下列哪一行代码会出错?
public void modify() {
int I, j, k;
I = 100;
while (I > 0) {
j = I * 2;
System.out.println(" The value of j is " + j);
k = k + 1; 这里会报错,K要初始化变量
I--;
}
}
一、下列哪一行代码会出错?
public void modify() {
int I, j, k;
I = 100;
while (I > 0) {
j = I * 2;
System.out.println(" The value of j is " + j);
k = k + 1; 这里会报错,K要初始化变量
I--;
}
}