public class ForExampleTwo { public ForExampleTwo() { int limit = 5; // NOTE: iteration variable declared as part of loop for (int i = 0; i <= limit; i++) { System.out.println("Square: " + (i * i)); } // NOTE: The following access is invalid (i's scope is within the loop // System.out.println(i); } public static void main(String[] args) { new ForExampleTwo(); } }