看下面的代码:
package com.test.test;
public class TestLoop {
public static void main(String[] args) {
for (int i = 0; i < 4; i++) {
System.out.println("现在在i=" + i + "的For循环中");
int j = 0;
if (i != -1) {
System.out.println("\t现在在j=" + j + "的IF中");
}
}
}
}
再看输出的效果: