title: Initialization of static final fields in Java
body: <pre><code>public class Main {
   static final int alex=getc();
   static final int alex1=Integer.parseInt("10");
   static final int alex2=getc();
  
  public static int getc(){
      return alex1;
  }
  
  public static void main(String[] args) {
      final Main m = new Main();
      System.out.println(alex+" "+alex1 +" "+alex2);
    } 
  }
  </code></pre>
  
  <p>Can someone tell me why this prints: <code>0 10 10</code>? I understand that it's a static final variable and its value shouldn't change but it`s a little difficult to understand how the compiler initializes the fields.</p>