When I define static or constant members, for example:
public static final Font BIG_FONT = new Font("", Font.BOLD, 18);
I noticed that they only load on first use, which either freezes at runtime or makes me somehow preload them, forcibly "using" the constant when the program starts.
Not static members of this type should be loaded at program startup, and not wait for loading at first use? How can I make sure they are preloaded?
Thanks in advance.
source share