CodePudding user response:
Java USES StringBufferCodePudding user response:
Java: stringbuilderGo: var bt bytes. The Buffer
To write a string of bt
Bt. WriteString (s1)
Bt. WriteString (s2)
CodePudding user response:
Java is the StringBuilder (StringBuilder than StringBuffer efficient because the StringBuilder is thread-safe, synchronization method does not do lock)Go is strings. Builder (go before 1.10 is bytes. The Buffer, but after strings. The Builder with efficient, reference)
CodePudding user response:
Java use StringBuilder (not thread-safe), consider using StringBuffer threading issues