title: Initialize final variable before constructor in Java
body: <p>Is there a solution to use a final variable in a Java constructor?
  The problem is that if I initialize a final field like:</p>
  
  <pre><code>private final String name = "a name";
  </code></pre>
  
  <p>then I cannot use it in the constructor.  Java first runs the constructor and then the fields. Is there a solution that allows me to access the final field in the constructor?</p>