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:
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