StringBuilders magic for very large strings
The StringBuilder
class is used to create mutable sequences of characters. Strings are immutable, so if you need to perform multiple operations on a string, it is better to use a StringBuilder
instead of a string
. This is especially useful when you need to concatenate a large number of strings. But there is more magic to it, especially when we go BIG!