System.out.print(root.val + ">"); //不打印
System.out.println(root.val + ">"); //正常打印
private void write(String s) {
try {
synchronized (this) {
ensureOpen();
textOut.write(s);
textOut.flushBuffer();
charOut.flushBuffer();
//(s.indexOf('\n') >= 0) print 不满足这个条件
if (autoFlush && (s.indexOf('\n') >= 0))
out.flush(); //可以手动flush
}
}
catch (InterruptedIOException x) {
Thread.currentThread().interrupt();
}
catch (IOException x) {
trouble = true;
}
}