Points of Curiosity ๐Ÿค”

Shwetank ThakurShwetank Thakur
1 min read

Table of contents

Both are mutable in nature i.e. value assigned to it can be changed but for StringBuffer we have all methods as synchronised that means at a time only one thread can get executed and in case of StringBuilder we have all methods a non synchronised which means multiple thread can execute simultaneously as a result StringBuffer are thread safe but low in performance and StringBuilder are not thread safe, but is high in performance.

0
Subscribe to my newsletter

Read articles from Shwetank Thakur directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Shwetank Thakur
Shwetank Thakur

I am working as a Software Developer. The technology which I know is Java and the languages known to me is Java. This blog is just a sharing of my knowledge about Java language with you people and get corrected by you people. My mistakes motives me...๐Ÿ™๐Ÿ˜Š