Can we use the static variables inside static methods?
Anónimo
There are some rules : A local variable can not be static : class test { static int a = 10; static void m1() { static int b=20; // this line will give error , because local variable can not be static . System.out.println(a); // this will give outpur 10. } }