Possible Duplicate:
String, StringBuffer, and StringBuilder
We know that String
are immutable where StringBuffer
/StringBuilder
are mutable. But sometimes we get confused what to use in our code.. the String or StringBuffer/StringBuilder ?? Practically in our maximum code/quick code we use to prefer String
than StringBuffer
/StringBuilder
.
This question is to solve the confusion, if you have any idea & proper reason for that, then please give a reply.
Below is the main difference between these three most commonly used classes.
Criteria to choose among String, StringBuffer and StringBuilder
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With