Path: csiph.com!usenet.pasdenom.info!aioe.org!eternal-september.org!feeder.eternal-september.org!mx05.eternal-september.org!.POSTED!not-for-mail From: Eric Sosman Newsgroups: comp.lang.java.programmer Subject: Re: Printing Out appended list Date: Thu, 21 Mar 2013 11:56:55 -0400 Organization: A noiseless patient Spider Lines: 22 Message-ID: References: <47637551-543f-49fc-8165-41de869e6a8f@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Thu, 21 Mar 2013 15:54:57 +0000 (UTC) Injection-Info: mx05.eternal-september.org; posting-host="0d73d8cc209bff1c6395088b400d0605"; logging-data="11544"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18Y/mY0PLOUiJXhy/6Eslay" User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:17.0) Gecko/20130307 Thunderbird/17.0.4 In-Reply-To: <47637551-543f-49fc-8165-41de869e6a8f@googlegroups.com> Cancel-Lock: sha1:za+NC1TKmLBLZ3n3hOkz6V6NlIE= Xref: csiph.com comp.lang.java.programmer:23033 On 3/21/2013 10:59 AM, subhabangalore@gmail.com wrote: > Dear Group, > > If I try to append the strings in sb within a loop, where strings are getting generated from loop, --this part is getting fine, but the problem is how I can take out the print of the "sb" portion. > > for (loop condition) { > StringBuilder sb = new StringBuilder(); > sb.append("some string"); > . . . > sb.append(anotherString); > } This pseudocode shows no printing at all, so I guess you have already found a way to "take out the print." What "print" are you talking about, and why do you want to get rid of it? Maybe if you showed actual code instead of pseudocode it would be easier for us to understand your intent. -- Eric Sosman esosman@comcast-dot-net.invalid