This is how I will emulate it in Java.
public static Foo CONSTANT; static { CONSTANT = new Foo("some", "arguments", false, 0);
Using a static block will do what you need.
Or you could just do:
public static Foo CONSTANT = new Foo("some", "arguments", false, 0);
source share