Paste the code directly as follows:
boolean status = InetAddress.getByName("192.168.1.22").isReachable(3000);