I would like to verify one thing about InetAddress.getByName(String).
For example, there is an app sending request to its server named www.coolapp.com , I can get the IP address of this server by:
String serverIp = InetAddress.getByName("www.coolapp.com");
But if the app is designed to connect to different server geographically, does this function return the corresponding IP of the server the app is connecting to though the host name is the same "www.coolapp.com"?
For example, I am using the app in Europe, it connects to server in Germany, server host name is "www.coolapp.com" IP is 182.12.12.12. Then, if I travel to Japan, the app is connecting to "www.coolapp.com" IP is 123.13.13.13 Will the API return the corresponding IP based on the geo-location?