stdout和stderr
In Java, how to print a string as a line to STDOUT? That is, the string and the newline character, nicely?
在Java中,如何打印字符串作为一行到标准输出 ? 也就是说,字符串和换行符很好吗?
And similarly, how to print the line to STDERR?
同样,如何将行打印到STDERR?
In Java, you can print string in a new line by ‘System.out.println()’ to STDOUT:
在Java中 ,您可以通过'System.out.println()'在STDOUT的新行中打印字符串:
System.out.println("my msg here");
In Java, print a string str to STDERR as a new line:
在Java中 ,将字符串str作为新行输出到STDERR:
System.err.println(str)
Standard error cab be accessed with ‘System.err’ in Java.
使用Java中的“ System.err”可以访问标准错误驱动程序。
翻译自: https://www.systutorials.com/how-to-print-a-line-to-stderr-and-stdout-in-java/
stdout和stderr