Below is the Java program to ping an IP address.
Also note that you can use below syntax to check if remote IP address is is reachable or not.
String ip = "google.com";
InetAddress address = InetAddress.getByName(ip);
boolean chkConnection = address.isReachable(1000);
Also note that you can use below syntax to check if remote IP address is is reachable or not.
String ip = "google.com";
InetAddress address = InetAddress.getByName(ip);
boolean chkConnection = address.isReachable(1000);