Static block

the code inside static block will be executed only once,at the first time the class loaded in to memory.

Constructor block of a class will be called after static block execution.

we can have n number of static block inside a class

public class Employee
{
public static void main(String[] args)
{
Test t1=new Test();
}
}
class Test
{
static int a;
Test()
{
System.out.println("Hi con");
}
static
{
a =10;
System.out.println("Hi");
}
}