sampleCodeForJAVAsocket