处理流之三标准输入、输出流
关于System类可参考文章:Java中System类、Math类、BigInteger与BigDecimal分别是什么?
- System.in和System.out分别代表了系统标准的输入和输出设备(控制台的输出输入)
- 默认输入设备是:键盘,输出设备是:显示器
- System.in的类型是InputStream
- System.out的类型是PrintStream,其是OutputStream的子类 FilterOutputStream 的子类
- 重定向:通过System类的setIn,setOut方法对默认设备进行改变。
- public static void setIn(I