D
Danger_Duck
Continuing my vein of simple java questions...For the
Java.io.PrintWriter, what is the difference between write and print?
For me, print and write mean the same thing so the difference between:
print(char[] s)
Print an array of characters.
and
write(char[] buf)
Write an array of characters.
is unknown. This is made especially acute when the documentation says
things like:
"print
public void print(char c)
Print a character. The character is translated into one or more
bytes according to the platform's default character encoding, and
these bytes are written in exactly the manner of the write(int)
method."
Anyone care to enlighten me on the difference and recommend when to
use which method?
Thanks!
Java.io.PrintWriter, what is the difference between write and print?
For me, print and write mean the same thing so the difference between:
print(char[] s)
Print an array of characters.
and
write(char[] buf)
Write an array of characters.
is unknown. This is made especially acute when the documentation says
things like:
public void print(char c)
Print a character. The character is translated into one or more
bytes according to the platform's default character encoding, and
these bytes are written in exactly the manner of the write(int)
method."
Anyone care to enlighten me on the difference and recommend when to
use which method?
Thanks!