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 th
You can use InetAddress for this. Try the below code,
InetAddress address = InetAddress.getByName("www.yahoo.com"); System.out.println(address.getHostAddress()); System.out.println(address.getHostName());