I saw StringBuilder and StringBuffer, but I don't understand

Asked 2 years ago, Updated 2 years ago, 83 views

I saw StringBuilder and StringBuffer, but I don't understand What is the difference between the two? Is there a difference in performance?

java stringbuilder stringbuffer

2022-09-22 22:37

1 Answers

StringBuffer works in a single thread in a synchronous manner, and is not a StringBuilder. That's why StringBuilder is faster.


2022-09-22 22:37

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.