URL Object is not recognized
<p>I am writing a web service similar to below. But Java is not recognizing the URL, URLConnection. I am unable to solve this issue.</p>

<pre><code>URL yahoo = new URL("http://www.yahoo.com/");
URLConnection yc = yahoo.openConnection();
int dataLen = yc.getContentLength() ;
</code></pre>
