urlreader.java

来自「初期JAVA学习非常有用的资料。帮助深入了解API。特别是Applet。」· Java 代码 · 共 18 行

JAVA
18
字号
import java.net.*;import java.io.*;public class URLReader {    public static void main(String[] args) throws Exception {	URL yahoo = new URL("http://www.yahoo.com/");	DataInputStream in = new DataInputStream(				 yahoo.openStream());	String inputLine;	while ((inputLine = in.readLine()) != null)	    System.out.println(inputLine);	in.close();    }}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?