• Post Reply Bookmark Topic Watch Topic
  • New Topic

what is difference in string and string buffer  RSS feed

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

DoYourOwnHomework
 
I like tacos! And this tiny ad:
The WEB SERVICES and JAX-RS Course
https://coderanch.com/t/690789/WEB-SERVICES-JAX-RS
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!