Method 1: 

```
InetAddress addr = InetAddress.getByName("192.168.0.101");
int port = 18250;
Socket socket = new Socket(addr, port);

```

Method 2:

```
Socket socket = new Socket("192.168.0.101",18250);

```