Tuesday, June 19, 2007

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());

0 comments:

 

Friends


Disclaimer
Interview Questions On Java,Java EE Copyright © 2010