Here is a Java class that, when saved to the file WhichI.java, will compile and illustrate the point being made correctly.
public class WhichI {
public static String i = "am canadian";
public static void main(String[] args) {
for (int i = 1; i <= 10; i++) {
System.out.println(i);
}
System.out.println(i);
}
}
I think that the none functioning example in the text should be replaced with this one.