Currently I am trying to do a string manipulation where in a for loop I want to append new pieces of String in front of and at the end of the existing string. So the output should be something like this.
I have a String array = {"False","No","Yes", "True};
So all the initial values should appear twice like shown below & the last value should be shown only once. ----------------------------------------- False No Yes True Yes No False -----------------------------------------
Do let me know how to go about the same
Bye, Uday
Venkata Narayana Reddy Pingala
Greenhorn
Joined: Jan 16, 2007
Posts: 3
posted
0
Hi,
Check this code. it will give you waht do you want:::
Check out the StringBuilder class, added in Java 5. It is basically a mutable String class, and allows you to avoid iterate twice through the array. [ January 16, 2007: Message edited by: �dne Brunborg ]