为什么InputStream input=url.openStream();会报错
public static void main (String[] args)throws Exception {
URL url=new URL("http","www.mldnjava.cn",80,"index.html");
InputStream input=url.openStream();
Scanner scan=new Scanner(input);
scan.useDelimiter("\n");
while(scan.hasNext()) {
System.out.println(scan.next());
}
}
用的eclipse