Java学习(一)输出错误信息与调试信息

先看代码

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用于输出调试信息,蓝色为黑色

猜你喜欢

转载自blog.csdn.net/qq_31583619/article/details/82824891