Assuming a http scheme (i.e. new URL (“http://www.google.com/”)) ,would not the IOException be thrown on myHttpURLConnection.connect() and not on myHttpURLConnection = myURL.openConection().
I mean instanceURL.openConection() doesn't seem to open a connection immediately, and if so how can there be an IOException.
Thank You in advance.