【发布时间】:2012-11-19 08:24:41
【问题描述】:
可能重复:
Java: System.out.println and System.err.println out of order
为什么是这个代码
System.err.println("err");
System.out.println("out");
打印
out
err
在 Eclipse 控制台上?
更新
如果我从命令行运行,相同的代码会以正确的顺序打印。
更新
如果我修复它
System.err.println("err");
Thread.sleep(5);
System.out.println("out");
它在 Eclipse 中也能正确打印
【问题讨论】: