---
title: "WHAT IS DIFFERENCE BETWEEN STRING,STRING BUFFER AND STRING BUILDER?"  
description: "WHAT IS DIFFERENCE BETWEEN STRING,STRING BUFFER AND STRING BUILDER?"  
author: "Hemant Patel"  
published: 2017-12-06  
updated: 2020-09-20  
canonical: https://www.mindstick.com/interview/23317/what-is-difference-between-string-string-buffer-and-string-builder  
category: "c#"  
tags: ["c#"]  
reading_time: 1 minute  

---

# WHAT IS DIFFERENCE BETWEEN STRING,STRING BUFFER AND STRING BUILDER?

String is immutable, and StringBuffer and StringBuilder is mutable. If you try to alter String values, another objects get created. But in string buffer and string builder you change their values.

And the difference between StringBuffer and StringBuilder is that StringBuffer is thread-safe.But StringBuilder is more efficient than StringBuffer.

## Answers

### Answer by Hemant Patel

String is immutable, and StringBuffer and StringBuilder is mutable. If you try to alter String values, another objects get created. But in string buffer and string builder you change their values.

And the difference between StringBuffer and StringBuilder is that StringBuffer is thread-safe.But StringBuilder is more efficient than StringBuffer.


---

Original Source: https://www.mindstick.com/interview/23317/what-is-difference-between-string-string-buffer-and-string-builder

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
