Initializing final fields seperately from their declaration place which is however not applicable to final static fields in Java. Why?
<p>A final field has to be initialized only once in Java by convention. No other initializations are permitted. The following program demonstrates the use of <strong>final</strong> and <strong>final static</strong> fields within a class.</p>

<pre><code>package main;

import java.util.ArrayList;
import java.util.List;

final public class Main
{
    private final static int a=10;
    private final List&lt;String&gt; list;

    public Main()
    {
        list=new ArrayList&lt;String&gt;();
        list.add("A");
        list.add("B");
        list.add("C");
        list.add("D");
    }

    private void show()
    {
        for(String l:list)
        {
            System.out.println(l);
        }
    }

    public static void main(String[] args)
    {
        new Main().show();
    }
}
</code></pre>

<hr>

<p>In the above code, the <strong>final</strong> field <code>list</code> of type <code>ArrayList</code> is being initialized within the constructor itself. The same thing is however not applicable to the <strong>final static</strong> field <code>a</code>. An attempt to initialize <code>a</code> within the constructor body causes a compile-time error indicating that <em>"can not assign a value to a final variable a"</em>. Why is the same thing not applicable to the final <strong>static field</strong> list which is being allowed to initialize withing the constructor?</p>
