Why can't we declare static variables inside a static block because static attributes ,when are allotted memory during class loading time and also ,with the class loading only the static block gets executed then why is there a restriction that we can't do this.
Also,during class loading when the main method gets loaded then why cant we even declare our static variables inside the main method also.