Static Block


public class StaticBlock 
{
    // Static block is executed before the main method at the time of class loading.
    static
    {
        System.out.println("Inside Static Block");         
    }
    public static void main(String[] args
    {
        System.out.println("Inside Main Method");
    }
    
}

Output:
Inside Static Block
Inside Main Method