@@ -0,0 +1,347 @@
+class Ideone%0A%7B%0A%09static int x = 10;%0A%09public static void main (String%5B%5D args) throws java.lang.Exception%0A%09%7B%0A%09%09/* Here in for loop x is acting as local varaible */%0A%09%09int x;%0A%09%09for(x = 0; x%3C20;x++)%7B%0A%09%09%09System.out.println(x);%0A%09%09%7D%0A%09%09System.out.println(%22*%22+x);%0A%09%09/* Accesing a static variable using Class Name*/%0A%09%09System.out.println(Ideone.x);%0A    %7D%0A%09%09%0A%7D%0A

Create static_var.java