Header Ads

  • Breaking Now

    How can you get the hostname on the basis of IP addres ?

    The following snippet of code helps you in finding hostname on the basis of IP address:-

    InetAddress inetAddress = 
    System.out.println ("Host Name: " 
    + inetAddress.getHostName());

    1 comment:

    1. i was tried that code. i think it is wrong. I didnt got output


    Post Top Ad

    Post Bottom Ad