the cause of StringBuild class

如果我们对字符串进行拼接操作,每次拼接,都会创建一个新的String对象,既耗时,又浪费空间,而StringBuild类可以解决这个问题。

那么StringBuild类是如果解决的呢?

因为StringBuild类是可变的字符序列,字符串缓冲区类。

原文地址:https://www.cnblogs.com/lzp123456-/p/9762553.html