less than 1 minute read

Strings

  • a) String is mutable when the operations are performed on the declared string, a new object is created with the new result.
  • b) String buffer is immutable when the operations are performed on the declared string, existing object is updated with the new result. every method is synchronized and thread safety is assured but performance wise not recommended.
  • c) String Builder is immutable, non Synchronized, thread safety is not assured and performance wise it is recommended.

Tags:

Categories:

Updated: