Java源码阅读之System 类详解

0. 类介绍

The System class contains several useful class fields and methods. It cannot be instantiated.
Among the facilities provided by the System class are standard input, standard output, and error output streams; access to externally defined properties and environment variables; a means of loading files and libraries; and a utility method for quickly copying a portion of an array.

System 类包含数个有用的类变量已经方法。它不能实例化。System 类提供的功能包括标准输入、标准输出和错误输出流;访问外部定义的属性以及环境变量;加载文件以及类库的方式;以及一个用于快速拷贝数组一部分的方法

1. 主要变量

1.1 in
public static final InputStream in = null;

The “standard” input stream. This stream is already open and ready to supply input data. Typically this
stream corresponds to keyboard input or another input source specified by the host environment or user.

标准输入流。这个流已经被打开,并且准备提供数据输入。典型地,这个流与键盘输入相对应或者其它的输入源,由主机环境或者用户指定的源。