//The scope of d is restricted to block following the for() statement. public class MainClass { public static void main(String[] argv) { for (int i = 0, d = 0; i < 5; i++) { System.out.println(i); System.out.println(d); } } }
0 0 1 0 2 0 3 0 4 0