I applied a job and they gave me a java test. There were many unknown concepts that I'm not familiar with, and have newer seen as well. One is about static field. I'm posting one of the strangest question below and asking for help. 

**The code includes the question in comments.**

```
public class MyClass {

    //what is the purpose of section, I mean for which purpose is it being used?
    //can variables inside of belove section be used or not. If can be used, then how?
    static{ 
        int a=5;
        double x=4.1;
    }

    //why this does not give any error because of redecleration of integer a?
    static int a=4;

    public static void main(String[] args) {
        System.out.println(a+"");//the output is 4
    }

}

```