Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

DNS Reverse Lookup???

 
James wu
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If I have a IP address, say, 216.115.109.6, then how can I get the domain name - www.yahoo.ca in Java.
Thank you very much for any help!
 
Vladan Radovanovic
Ranch Hand
Posts: 216
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Did You try getHostName() method of InetAddress class?
That should do it.
Vladan
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic