As we know, System.out is used as the standard output in Java and System.err is often used to output the error messages you do not expect coming. However, the essential difference between them is that THERE IS NO CACHE IN SYSTEM.ERR, to the contary, SYSTEM.OUT HAS CACHE.
ex:
public class TestSystem {
public static void main(String[] args){
System.err.println("err");
System.out.println("normal");
System.err.println("err");
System.err.println("err");
}
}
output(the first time):
err
err
err
normal
That's all!