Difference between StringBuilder and StringBuffer

后端 未结 30 2401
独厮守ぢ
独厮守ぢ 2020-11-21 15:06

What is the main difference between StringBuffer and StringBuilder? Is there any performance issues when deciding on any one of these?

30条回答
  •  被撕碎了的回忆
    2020-11-21 15:31

    Since StringBuffer is synchronized, it needs some extra effort, hence based on perforamance, its a bit slow than StringBuilder.

提交回复
热议问题