/*
RULE: static keyword only applicable for variables , methods and block but not for classes
*/
public class Static_Demo
{
static int x=10;
static
{
System.out.println(x);
}
public static void main(String arg[])
{
System.out.println("static main method")
}
}
RULE: static keyword only applicable for variables , methods and block but not for classes
*/
public class Static_Demo
{
static int x=10;
static
{
System.out.println(x);
}
public static void main(String arg[])
{
System.out.println("static main method")
}
}