Skip to content

Instantly share code, notes, and snippets.

@rcurtis
Created December 6, 2013 20:33
Show Gist options
  • Save rcurtis/7831644 to your computer and use it in GitHub Desktop.
Save rcurtis/7831644 to your computer and use it in GitHub Desktop.
public class StaticWTF
{
{
System.out.println("Before constructor");
}
static
{
System.out.println("Static before constructor");
}
public StaticWTF()
{
System.out.println("In constructor");
}
public static void main(String[] args)
{
System.out.println("Before creating object");
new StaticWTF();
System.out.println("After creating object");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment