title: How to check if an URL doesn't exist?
body: <p>I trying to check if an URL which I want to connect to exists or not. Here's my attempt:</p>
  
  <pre><code>try {
      // Connect to the url
      document = Jsoup.connect("http://www.malformedurl.com").get();
      tags = document.select(".tags .tag a");
      num = document.select(".tag .count");
      // Take the wanted data 
      UrlFunctions.UrlParse(tags, num);
  } catch (java.net.MalformedURLException e) {
      System.out.println("URL DOESNT EXIST");
  }
  </code></pre>
  
  <p>After running that, I don't get the message <code>URL DOESNT EXIST</code>. What exception should I use or what else should I do?</p>