Is StringBuffer thread safe?

Is StringBuffer thread safe?
Answer
StringBuffer is synchronized and therefore thread-safe.
StringBuilder is compatible with StringBuffer API but with no guarantee of synchronization.
 

Tìm kiếm

Back
Top