Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JSPWriter difference write vs. print?

 
andy armstrong
Ranch Hand
Posts: 154
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What is the difference between the two
and when to best use?
 
Arvind Chavar
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The write methods give you limited capability of kind of data types you could write to char[],int , and String.Whereas with print methods you gain flexibilty to write other primitive types and objects.Based on these factors you could choose what you need.
Another point of comparison you would look atis issue of buffering.Neither of them have any advantage over the other as JSP output is buffered by default.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic