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!

difference between System.out.println(..)and PrintWriter.println(..)

843785Jul 9 2008 — edited Jul 9 2008
Hello every one

With System.out.println(..) we can print to Console.

But System.out internally creates PrintWriter object.So why cant we use
PrintWriter.println(..) directly to write to console.

Is there aany disadvvantage with PrintWriter.println(..).

If so can anyone please tell me what is that and

what is the advantage we r going to get with System.out.println(..) method of writing to console.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 6 2008
Added on Jul 9 2008
6 comments
1,550 views