This is nearly equivalent to using a static initializer - but it's not a static initializer.
I guess another way to do this might be by writing a
Servlet,
JSP,
Applet, or other object that relies of a framework of some sort to invoke it. Except that in the case of Servlets and JSPs at least, there really
is a main() method for the server. It's just not in code that you write - it's kind of hidden from view. For an Applet, I'm not sure. I suspect there's probably a main() method being used there too, but I don't know where it is offhand. I agree with Campbell - this doesn't seem like a very useful question for real-life use.