WHAT IS DIFFERENCE BETWEEN STRING,STRING BUFFER AND STRING BUILDER?
Ask by Hemant Patel
Updated 20 Sep 2020
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.