lets take a sample code to demonste what happen when java tries to resolve the ip for the give hostname.
import java.net.InetAddress;
import java.net.UnknownHostException;
public class DNSClient {
public static void main(String[] args) {
InetAddress address = null;