Why sysout allways prints 1? : <p>In below code, why sysout allways prints 1?</p>

<pre><code>public class A implements ActionListener{       
    public static int X = 0;
    private Timer timer;        
    public A(){
        timer = new Timer(16 ,this);
        timer.setInitialDelay(16);
        timer.start();      
    }
    public void actionPerformed(ActionEvent arg0) {
        System.out.println(X);
    }           
    public static void main(String args[]){
        new A();
        new B().start();
    }
}    
class B extends Thread{

    public void run(){
        try {
            Thread.sleep(200);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        A.X++;      
    }
}
</code></pre>

<p>I expect something like this output:</p>

<pre><code>1
2
3
...
</code></pre>

<p>Note that I dont want to use another approach.</p>
