File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

what is difference in string and string buffer

 
ajay verma
Ranch Hand
Posts: 37
  • 0
  • 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
  • 0
  • 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
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What do you think?

DoYourOwnHomework
 
Consider Paul's rocket mass heater.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic