本帖最后由 张君 于 2012-8-8 21:00 编辑
import java.net.*;
import java.io.*;
class WHWWW{
public static void main(String[]arg){
URL u=new URL("http://www.whitehouse.gov/");
InputStream ins= u.openStream();
InputStreamReader isr=new InputStreamReader(ins);
BufferedReader whitehouse=new BufferedReader(isr);
System.out.println(whitehouse.readLine());
System.out.println(whitehouse.readLine());
System.out.println(whitehouse.readLine());
System.out.println(whitehouse.readLine());
System.out.println(whitehouse.readLine());
}
}
程序如下,报错原因不清楚。 |
|