先看代码
package com.linfeng.debug;
public class PrintErrorAndDebug {
public static void main(String[] args) {
System.out.println("this is running in console");
System.err.println("this is red");
}
}
输出结果:
注释:
Systen.err用于输出错误信息,颜色为红色
System.out用于输出调试信息,蓝色为黑色