Anu, the reason for Go2In not getting displayed is simple. go1() and go2() are both static synchronized methods. So when go1() is called inside the run method when the first
thread is created in main(), then the call tries to join itself so it will wait forever.
Now when the second thread is created in main() method, that time go2() is called in run method.
It will try to get a lock on the class Atr as go2() is a static synchronized method. But the thread created at line 28 holds the lock on Atr class as it called go1() which is also a static synchronized method. This is why the call to go2() will wait for infinite time to get a lock on Atr class...