I tried connecting to an IP address (e.g. http://222.222.222.222:8080) and a URL (e.g. http://www.website.com) while my wiFi is disabled. I noticed that if I don't have a wiFi and I tried connecting to an IP address, it gives me a ConnectException
error. On the other hand, if I don't have a wiFi and I tried connecting to a URL, it gives me an IOException
error. Why am I receiving different Exception
for the 2 cases when the only difference is I supplied an IP address for the first one and a URL for the other? Can someone enlighten me on this one? I am asking this for clarification.
Thank you!