title: Initialization required for public static final but not for public final
body: <p>I have three constant floats, whose values I want to be assigned to in the constructor of the class.</p>
  
  <p>I declare all three constants before the constructor. As an experiment, I set different modifiers to each:</p>
  
  <pre><code>public static float defaultdim;
  public static final float maxdim;
  public final float mindim;
  </code></pre>
  
  <p>My IDE, Eclipse, detects an error for the second constant, maxdim, namely:</p>
  
  <blockquote>
    <p>the blank final field maxdim may not have been initialized</p>
  </blockquote>
  
  <p>What puzzles me is not why the error appears but why the error doesn't appear in the case of mindim, which is also final, considering the error message is connected to the fact that the variable is final. In other words, the error is there because a final variable is not initialized during declaration. Both variables are final and both are not initialized, but the error appears in only one case.</p>
  
  <p>The two variables differ by the modifier static, which suggests that would be the cause of the error. However, I do not see why this would be the case since no error appears in the case of defaultdim, which is only static, not final and the error itself does not refer to the modifier static. Could anyone explain the reason behind it to me?</p>