Skip to content

Instantly share code, notes, and snippets.

@codiodes
Last active December 7, 2017 14:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save codiodes/b8671aaf299c9778c451a0ded2039f6c to your computer and use it in GitHub Desktop.
Save codiodes/b8671aaf299c9778c451a0ded2039f6c to your computer and use it in GitHub Desktop.
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