How can we improve performance of this piece of code ?
Posted
by Rachel
on Stack Overflow
See other posts from Stack Overflow
or by Rachel
Published on 2010-05-05T01:45:28Z
Indexed on
2010/05/05
1:48 UTC
Read the original article
Hit count: 186
java
How to Improve performance of this chunk of code :
public static String concatStrings(Vector strings) {
String returnValue = "";
Iterator iter = strings.iterator();
while( iter.hasNext() ) {
returnValue += (String)iter.next();
}
return returnValue;
}
© Stack Overflow or respective owner