System.err和System.out

System.err和System.out是错误输出和标准输出

System.err.println只能在屏幕上实现打印,err是运行期异常和错误反馈的输出流的方向。
使用err打印出的字符串,在eclipse的console会显示成红色的。

System.out.println 能重定向到别的输出流,这样你在屏幕上将看不到打印的东西。
System.out.println可能会被缓冲,而System.err.println不会

参考:http://blog.sina.com.cn/s/blog_b4bfd3050101bmbk.html
原文地址:https://www.cnblogs.com/yunkong/p/4402710.html