Java String Concatenation

后端 未结 7 1719
無奈伤痛
無奈伤痛 2021-01-21 14:45

I have a issue with my java code. i asked the same question yesterday. I got answer but sorry it was my fault. My question is not clear.

I have code looks like this:

7条回答
  •  一向
    一向 (楼主)
    2021-01-21 14:53

    moreover, if it is possible to estimate the size of the concatenated string, you could use StringBuffer(int capacity)/StringBuilder(int capacity) to avoid resizing

提交回复
热议问题