@@ -0,0 +1,326 @@
+// Demonstrate lifetime of a variable.%0Aclass VarInitDemo %7B%0A%09public static void main(String args%5B%5D) %7B%0A%09%09int x;%0A%09%09%0A%09%09for(x = 0; x %3C 3; x++) %7B%0A%09%09%09int y = -1; // y is initialized each time block is entered%0A%09%09%09System.out.println(%22y is: %22 + y); // this always prints -1%0A%09%09%09y = 100;%0A%09%09%09System.out.println(%22y is now: %22 + y);%0A%09%09%7D%0A%09%7D%0A%7D%0A

Create VarInitDemo.java