import java.net.InetAddress;
public class MainClass {
public static void main(String args[]) throws Exception {
InetAddress ca = InetAddress.getByName("www.google.ca");
InetAddress com = InetAddress.getByName("www.google.com");
if (ca.equals(com)) {
System.out.println("same");
} else {
System.out.println("not the same");
}
}
}
|