+ 1

What is the difference between StringBuffer and StringBuilder classes in java?

13th Jul 2020, 9:11 AM
Gauri Shirkande
Gauri Shirkande - avatar
4 Answers
+ 2
apart from performance and multithreading theirs no such difference. StringBuffer is slower in performance and mostly used in multithreaded environment.
13th Jul 2020, 9:44 AM
ŠœŠ³. ŠšŠ½Š°ŠæšŸŒ 
ŠœŠ³. ŠšŠ½Š°ŠæšŸŒ  - avatar
+ 1
Basically, both are used for same purpose. StringBuffer class is synchronised means two threads can't use it simultaneously whereas StringBuilder is not. For more details you can go through the article below. Thank you https://www.javatpoint.com/difference-between-stringbuffer-and-stringbuilder
13th Jul 2020, 9:44 AM
Hardik Sharma
Hardik Sharma - avatar
+ 1
Thank you!šŸ™Œ
13th Jul 2020, 10:09 AM
Gauri Shirkande
Gauri Shirkande - avatar
0
You're welcome Gauri Shirkande
13th Jul 2020, 3:17 PM
Hardik Sharma
Hardik Sharma - avatar