And similarly, how to print the line to STDERR?
In Java, you can print string in a new line by ‘System.out.println()’ to STDOUT:
System.out.println("my msg here");
In Java, print a string str to STDERR as a new line:
Standard error cab be accessed with ‘System.err’ in Java.
Answered by dtivl.