I am running a simple java program to connect to the hard coded URL "http://www.google.co.in/?gws_rd=ssl" and when trying to fetch a response code: it throws the connection timed out exception.
The code snippet as follows:
url = new URL("http://www.google.co.in/?gws_rd=ssl");
urlConn = (HttpURLConnection) url.openConnection();
**int responseCode = urlConn.getResponseCode(); ---> exception line**
Please help if any one have the resolution?