title: Order of initialization of static variable in Java
body: <p>I have two classes in two different files, each one has a static variable, I would like to know if there is a way to predict which one will be initialized first (is it implementation dependant)? My code looks like this?</p>
  
  <pre><code>File1:
  public class A
  {
    public static boolean a = Logger.log();
  }
  
  File2:
  public class B
  {
    public static boolean b = Logger.log();
  }
  
  File3:
  public class Logger
  {
    public static boolean log();
  }
  </code></pre>