title: Execution order of of static blocks in an Enum type  w.r.t to constructor
body: <p>This is from Effective Java :</p>
  
  <pre><code>// Implementing a fromString method on an enum type
    private static final Map&lt;String, Operation&gt; stringToEnum
        = new HashMap&lt;String, Operation&gt;();
  
    static { // Initialize map from constant name to enum constant
      for (Operation op : values())
        stringToEnum.put(op.toString(), op);
    }
  
    // Returns Operation for string, or null if string is invalid
    public static Operation fromString(String symbol) {
      return stringToEnum.get(symbol);
    }
  </code></pre>
  
  <blockquote>
    <p>Note that the Operation constants are put into the stringToEnum map
    from a static block that runs after the constants have been created.
    Trying to make each constant put itself into the map from its own
    constructor would cause a compilation error. This is a good thing,
    because it would cause a NullPointerException if it were legal. Enum
    constructors aren’t permitted to access the enum’s static fields,
    except for compile-time constant fields. This restriction is necessary
    because these static fields have not yet been initialized when the
    constructors run.</p>
  </blockquote>
  
  <p>My question is regarding the line :</p>
  
  <blockquote>
    <p>"Note that the Operation constants are put into the stringToEnum map 
    from a static block that runs after the constants have been created" .</p>
  </blockquote>
  
  <p>I thought the static block gets executed before the constructor runs. The are actually executed   during  class load time. </p>
  
  <p>What am I missing here ?</p>