String Buffer
String Buffer
Note:
- StringBuffer is mutable like StringBuilder
- It is thread-safe (synchronized), but slightly slower than StringBuilder
- Use when multiple threads might access the same buffer
--------------------------------------------------
Creating a StringBuffer
--------------------------------------------------
Common Methods
--------------------------------------------------
--------------------------------------------------
Conversion
--------------------------------------------------
Iteration Example
--------------------------------------------------
Sample Code
--------------------------------------------------
When to Use
--------------------------------------------------