port in URL constructor
<p>i want to check that which port is used , when the port is not explicitly specified in the URL constuctor. SO here is a code.</p>

<pre><code> URL url = new URL("http://www.ietf.org/rfc/rfc2396.txt");
    System.out.println("URL :"+url.getPort());
</code></pre>

<p>getPort() returns -1. It indicates that i have not set the port thats why grtPort() had returend the -1 value.</p>

<p>iIn java doc of <strong>java.net.URL</strong> class </p>

<blockquote>
  <p>"If the port is not specified in URL, the default port for the
  protocol is used instead.  the default port for http is 80."</p>
</blockquote>

<p>then in above case it should have used the 80 default port. Isn't it ?
But it is not. 
Which port is used ?</p>
