jdk 源码 :
/**
* Prints a string. If the argument is null
then the string
* "null"
is printed. Otherwise, the string's characters are
* converted into bytes according to the platform's default character
* encoding, and these bytes are written in exactly the manner of the
* {@link #write(int)}
method.
*
* @param s The String
to be printed
*/
public void print(String s) {
if (s == null) {
s = "null";
}
write(s);
}