why this simple java application goes into dead lock?

Printable View