• Post Reply Bookmark Topic Watch Topic
  • New Topic

Can StringBuffer do everything that String does ?  RSS feed

 
Greenhorn
Posts: 4
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I understand the mutable - immutable property based on which string and stringbuffer are differentiated. But can we say that StringBuffer can do everything that String does ?
 
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"Deep",
Please check your private messages.
-DOM
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No. If you compare the API for the two classes, they are able to do different things.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!