Something wrong with this code?
It doesn't return `true`. Always an instant `false` return.

```
public boolean chkCon() {
        try {
            URL url = new URL("http://google.com");
            HttpURLConnection connection = (HttpURLConnection) url.openConnection();
            connection.setRequestMethod("GET");
            connection.connect();
            int code = connection.getResponseCode();
            return code == 200;
        } catch (Exception e){
            return false;
        }
    }

```

If i set:

```
public boolean chkCon() {
  return true;  // it works
}

```