I have the DNS server IP address and a hostname.
Using Java, how can I find the IP address of the hostname as returned by that DNS server using the IP address and the hostname?
Take a look at InetAddress and the getHostAddress() method.
InetAddress
getHostAddress()
InetAddress address = InetAddress.getByName("www.example.com"); System.out.println(address.getHostAddress());
1.4m articles
1.4m replys
5 comments
56.9k users