Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

import java.net.InetAddress;

public class Main {
    public static void main(String[] args) throws Exception {
        InetAddress address = InetAddress.getByName("17.16.15.14");

        boolean reachable = address.isReachable(10000);

        System.out.println("Is host reachable? " + reachable);
    }
}