Author Topic: Write a program to get the Host Name on the basis of IP address  (Read 409 times)

0 Members and 1 Guest are viewing this topic.

Offline ebenzunlimited

  • Lead Admin
  • *****
import java.net.*;
public class HostName
{
public static void main(String args[])
{

InetAddress inetAddress =InetAddress.getByName("127.64.84.2");//get the host Inet using ip
System.out.println ("Host Name: "+ inetAddress.getHostName());//display the host

}

}
Insane I Lived♥ Sane I Died♥<img src='http://i253.photobucket.com/albums/hh74/reallytired2/family%20pictures/buckeye%20stuff/clap.gif' />

 

* Post Updates

Re: Hi Shole Here by zeal
[Yesterday at 05:31:19 PM]


Free vs Paid Promotion by Shole
[Yesterday at 11:34:55 AM]


How to write quality content for a blog. by Shole
[Yesterday at 11:25:01 AM]

Inside: 3P Techies Blog

* Newest Techies

Get Updates


Sign up to get latest updates delivered to your inbox. No Spam, We Promise!

Get Hosting!

a Faster web hosting service

Copyright 3rd Planet Techies. All rights Reserved.

Top || Mobile || Privacy