title: Java basics: a static function without a name, or return type
body: <pre><code>public class Main {
      public static final Logger LOGGER = Logger.getLogger(Main.class.getName());
  
      static {
          try {
               LOGGER.addHandler(new FileHandler("errors.log",true));
          }
          catch(IOException ex) {
               LOGGER.log(Level.WARNING,ex.toString(),ex);
          }
      }
  ...
  </code></pre>
  
  <p>I'm wondering what is this nameless static function about.</p>
  
  <p>I never saw anything like this in java (which I'm currently learning).</p>
  
  <p>What is it for ?</p>
  
  <p>When is it typically used ?</p>
  
  <p>When is this gonna be executed in the program ?</p>