지금 쓰래드 동기화 공부중인데


class matha
{


    public static int n = 0;
    public void sum()
    {
        synchronized (this)
        {
            for(int A=0;A<10000;A++)
            {
                n++;
            }
        }
    }


}

class thre extends Thread
{


    matha qqq = new matha();
   
    public void run()
    {
        qqq.sum();
    }
}
public class t05
{
    public static void main(String[] args)
    {
        thre t1 = new thre();
        thre t2 = new thre();
       
        t1.start();
        t2.start();
       
        try {
            t1.join();
            t2.join();
        }

catch (InterruptedException e)

{          

e.printStackTrace()

}
        System.out.println(matha.n)

}


}


이러면 20000이 출력되야 하는거 아니야??

자바 병신에게 자비좀