Scoping a StringBuilder inside a for loop
Posted
by syker
on Stack Overflow
See other posts from Stack Overflow
or by syker
Published on 2010-04-14T17:57:08Z
Indexed on
2010/04/14
18:03 UTC
Read the original article
Hit count: 138
When would you ever want to scope a String Builder inside a for loop?
Sample Code:
....
for (int i=0; i<cnt; i++) {
....
{
StringBuilder sb = new StringBuilder();
sb.append(",");
....
}
}
....
© Stack Overflow or respective owner