Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Demonstration of Static Block being called before Main method in Java
public class StaticBlockBeforeMain {
static
{
System.out.println("Inside Static Block");
}
public static void main(String[] args) {
System.out.println("Inside Main Method");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.