I am using Java InetAddress to find if the current internet connection can resolve an address via DNS. However if I put in a random address (One that definitely dose not exist on the internet) I still get an IP back, can anyone explain why this is the case?
Code I am Using:
hosts = InetAddress.getAllByName(site.getSite());
for(InetAddress host : hosts) {
System.out.println(result_pref+"Ok "+ host);
}
Output by command prompt: Testing DNS Host: www.goooglelsdkfjsdlkfjsdklj.com - Result: Ok www.goooglelsdkfjsdlkfjsdklj.com/67.215.65.132
Thanks in advance