Code:
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.net.Socket;
import java.net.UnknownHostException;
public class Client {
public static void main(String[] args) {
Socket server = null;
try {
server = new Socket("*******",1234);
InputStream in = server.getInputStream();
OutputStream out = server.getOutputStream();
out.write(5);
out.write(5);
System.out.println(in.read());
} catch (Exception e) {
// TODO: handle exception
}finally{
if ( server != null )
try { server.close(); } catch ( IOException e ) { }
}
}
}