Frage im Vorstellungsgespräch bei Capgemini

What is the difference between String Builder and String Buffer

Antworten zu Vorstellungsgespräch

Anonym

2. Dez. 2016

one is sychronized and other is not one is thread safe and other is not

Anonym

17. März 2018

StringBuffer Synchronized hence threadsafe thread safe hence slow StringBuilder Introduced in Java 5.0 Not synchronized hence fast & efficient User explicitly need to synchronize it, if he want You can replace it will StringBuilder without any other change