5.3.2.You are allowed to declare variables in the statement part.
//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);
}
}
}