Giventhismethodinaclass:publicStringtoString(){StringBufferbuffer=newStringBuffer();buffer.append(<?);buffer.append(this.name);buffer.append(>?);returnbuffer.toString();}Whichistrue?()
A.ThiscodeisNOTthread-safe.
B.TheprogrammercanreplaceStringBufferwithStringBuilderwithnootherchanges.
C.ThiscodewillperformwellandconvertingthecodetouseStringBuilderwillnotenhancetheperformance.
D.Thiscodewillperformpoorly.Forbetterperformance,thecodeshouldberewritten:return“<“+this.name+“>”;
![](https://lstatic.shangxueba.com/sxbcn/h5/images/tips_org.png)