I have a list of IPs. I need to make reveres DNS, i.e, I want the website name.
I tried the following:
InetAddress addr = InetAddress.getByName(\"98.
Using IP address to get the domain name (in the way you are expecting) might not be possible. There will be several servers for Yahoo and they all will map to the domain name yahoo.com. But they will have individual ip address and host name. The addr.getCanonicalHostName() returns the host name and not the domain name!