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 = 
    InetAddress.getByName("67.83.45.9");
    System.out.println ("Host Name: " 
    + inetAddress.getHostName());
    
    

    1 comment:

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

      ReplyDelete

    Post Top Ad

    Post Bottom Ad