3 回答
TA贡献1824条经验 获得超5个赞
System.out
PrintStream#println(String)
println
printf
ABC\n
ABC\n
public void safePrintln(String s) { synchronized (System.out) { System.out.println(s); }}
safePrintln(...)
System.out.println(...)
TA贡献1868条经验 获得超4个赞
OutputStream
System.setOut
System.out
Thread-1 System.out.println("A"); System.out.println("B"); System.out.println("C");Thread-2 System.out.println("1"); System.out.println("2"); System.out.println("3");
1 2 A 3 B C
System.out
OutputStream
OutputStream
1A 2B
.
System.out.println
PrintStream
添加回答
举报