Suppose my email address is xyz@yahoo.com and I want to check if yahoo.com is a valid domain or not.
Can anyone tell me which Java API I ca
One thing that you could do is trying to resolve "yahoo.com". Something like this:
public static void main(String[] args) throws UnknownHostException {
InetAddress inetAddress = InetAddress.getByName("yahoo.com");
System.out.println(inetAddress.getHostName());
System.out.println(inetAddress.getHostAddress());
}
which outputs:
yahoo.com
67.195.160.76