Saturday, 19 April 2014

what is difference between String and StringBuffer

String :
  • String objects are constants and also immutable.
  • String is nothing but sequence of characters. which is enclosed by "".
  • which means once you can initialize the value for this it.
  • It can not be changed.
StringBuffer :
  • StringBuffer objects are not constants and also it is mutable.
  • StringBuffer can add Text or remove text.

No comments:

Post a Comment