title: final variable assignment: at declaration or in constructor?
body: <p>First of all this is NOT an exact duplicate of <a href="https://stackoverflow.com/questions/677595/initialize-final-variable-before-constructor-in-java">Initialize final variable before constructor in Java</a>. It is probably related, but there aren't any answers that satisfy me.</p>
  
  <p>My problem is about final variables in Swing GUI's. It's about custom <code>Action</code>s in particular.
  I have a number of <code>final</code> variables and a number of <code>static final</code> variables.</p>
  
  <p>The question is: if the variable is actually a constant, what is better: initialise them at construction-time, or initialise them at declaration?</p>
  
  <p>The answers on the question I mentionned above generally point towards making the variable <code>static</code> as soon as you are able to assign it when you declare it. That doesn't really make sense to me, as the variables aren't used in a static context. I have a couple of Images that my form uses like icons, I made those static because an Image simply is a static thing unless your application modifies them. That makes sense.</p>
  
  <p>On the other hand, the <code>Action</code>s are new instances of a custom inner class. Very technically they are static too, but it just feels different. They simply <strong>mustn't</strong> be available in static context imo. So do I put:</p>
  
  <pre><code>private final CustomAction customAction = new CustomAction();
  </code></pre>
  
  <p>Or do I initialise it in the constructor? Which is better? Or am I thinking the wrong way about <code>static</code>?</p>