difference between System.out.println() and System.err.println()

后端 未结 7 603
情书的邮戳
情书的邮戳 2020-12-12 16:16

What is the difference between System.out.println() and System.err.println() in Java?

相关标签:
7条回答
  • 2020-12-12 16:53

    this answer most probably help you it is so much easy System.err and System.out both are the same both are defined in System class as reference variable of PrintStream class as public final static PrintStream out = null; and public final static PrintStream err = null;

    means both are ref. variable of PrintStream class. normally System.err is used for printing an error messages, which increase the redability for the programmer.

    A minor difference comes in both when we are working with Redirection operator.

    0 讨论(0)
提交回复
热议问题