static initialization

 

  Static initialization blocks consist of static { code }. 

 

  Static initialization blocks are always run (once) at class load time. They are not run again for every later instantiation of the class. 

 

  The blocks are run in the order they appear in the source code mixed in with regular static variable statements. See initialization order for a demonstration.

 

  Note that you have block scope in a static initialization block, so there can be variables initialized resembling identical-looking ones outside the block.