I saw Nicola's answer and wondered if I should check my Java coding habits. I often do:
I'm guessing the static is redundant, but I wonder what a professional code stylist would recommend for this situation?
Joined: Apr 10, 2010
i am not a professional code stylist
In the context of the problem arised in this thread it was not a matter of style, but to see if the code compiles or not.
The most important thing is that you always know what you are doing.
In your case, as far as i know, you can freely use static initializers and then you should not change your coding habits, but be sure to know that the members initialized in a static block are initialized the first time the class is loaded.