let’s say that I want to create a new string during a “for” loop,
The new string will be a change of an exsist string that will be change depanding a conditions and positions of the loop.
How can I insert to an exist string new chars?
I went through the whole method summary that relates to strings and didn’t get my answer there.
Edit: Originaly I posted a java 4 link of methods by mistake. I use the newest version of java.
Thank you
Either use a
StringBuilderorString.concat(String)Example:
And about googling javadocs: Google will almost always return ancient 1.4 versions. if you search for keywords like the classname alone. Search for
classname /6, e.g.StringBuilder /6and you will get the current version.