Error in retrieving the data..

suppose i write the code as.....

import java.net.*;

import java.io.*;

public class Tut {

public static void main(String[] args) throws Exception {

URL yahoo = new URL("http://www.yahoo.com/");

BufferedReader in = new BufferedReader(

new InputStreamReader(

yahoo.openStream()));

String inputLine;

while ((inputLine = in.readLine()) != null)

System.out.println(inputLine);

in.close();

}

}

It catches an exception!! it does not retrieve the data....

can ne1 plz solve this problem.... the code writer insists on the code working!! but it doesnt someone please help me out....

[675 byte] By [Vive_JavaNETa] at [2007-11-27 5:04:25]
# 1
Sorry, but we aren't mind readers. Post the error message and the stacktrace. Please use code formatting when you post code. http://forum.java.sun.com/help.jspa?sec=formattingKaj
kajbja at 2007-7-12 10:22:45 > top of Java-index,Java Essentials,New To Java...