• Post Reply Bookmark Topic Watch Topic
  • New Topic

PrintWriter Purpose  RSS feed

 
Dale DeMott
Ranch Hand
Posts: 515
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What exactly is the purpose of PrintWriter? What can it do that other classes can't do?
Dale
 
Steve Deadsea
Ranch Hand
Posts: 125
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It does not do much that a Writer does not do. Both Writers and PrintWriters accept Strings as input. PrintWriter has methods called print() and println() that are similar to those methods in PrintStream. PrintWriter is mainly meant for people who are upgrading their character streams from PrintStreams (8-bit) to Writers (16-bit) so that they can use the same API.
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!