Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

what is difference in string and string buffer

 
ajay verma
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
what is difference in string and string buffer?
 
ajay verma
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1.string is immutable where is string builder is mutable
2.In stringBuilder, automatically increase and decrease size of string object whenever add elements and delete elements .Where in string , it is fixed size .
3.StringBuilder can performe a insert(),Delete(),Reverse(),Sort() operations etc and we can create multiple instances .Where as String , It can't perfome .
4.StringBuilder takes enough memory for variable .Where as String can't perfome
 
Mark Newton
Ranch Hand
Posts: 129
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What do you think?

DoYourOwnHomework
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic