public void print(Object obj)
Print an object. The string produced by the String.valueOf(Object) method is translated into bytes according to the platform's default character encoding, and these bytes are written in exactly the manner of the write(int) method.
obj - The Object to be printedS
public void write(char cbuf)
Write an array of characters.
cbuf - Array of characters to be written
IOException - If an I/O error occurs