Skip to Main Content

New to Java

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

PrintWriter.append vs PrintWriter.print

843785Sep 8 2008 — edited Sep 8 2008
Hi.....what's the difference between those two?
append() returns PrintWriter and print() returns nothing. When each method should be used?

How about println(); Is println is used whenever to format a newline.
print("this is test\n"); // using \n will not be platform-independent?
println("this is test"); // and this println format will be platform-independent.

Thanks....
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 6 2008
Added on Sep 8 2008
2 comments
1,751 views