class staticdemo{
    //static block
    static{
        System.out.println("Static block");
    }

    public static void main(String [] args){
        System.out.println("Main Method");
    }
}

Create staticdemo.java