Ping url and get status in java
<pre><code>         URLPing urlPing = new URLPing();
         PingResponse pingResponse = urlPing.ping(URLName);
         if(pingResponse.getResponseCode() == 200){
                response = true;
         }
         else{
                response=false;
         }
</code></pre>

<p>This is what i have tried at present.</p>
