只需将网址粘贴在第九行括号内即可
package com.meession.test;
import java.io.DataInputStream;
import java.net.URL;
public class Internet {
public static void main(String args[]){
URL myURL;
DataInputStream myURLContent;
try{
myURL=new URL("//www.zzvips.com");
myURLContent=new DataInputStream(myURL.openStream());
while(myURLContent.readLine() != null){
String Iline=myURLContent.readLine();
System.out.println(Iline);
}
myURLContent.close();
}
catch(Exception e){
System.out.println("Error");
}
}
}