When we want to initialize data at class loading time when object is not created and before main method then we go with static block.
Static block
{
//statements
}
Static block is used to initialize static data member.
We can have more than 1 static block. In case of more than 1 static block ,then order of execution is determine by the order of entriesIn the class.