Adding a small java socket practise with minor thread lock test