Frage im Vorstellungsgespräch bei Nexient

What is the difference between string concatenation and string builder?

Antwort im Vorstellungsgespräch

Anonym

21. Okt. 2016

String Concatenation operates on O(n^str.length) as we concatinate a string every iteration will take the previously written string rewrite it and append the new character each time. whereas string builder operates in O(n) as it only appends on letter at the time to what it has.