Path: csiph.com!x330-a1.tempe.blueboxinc.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!border3.nntp.dca.giganews.com!Xl.tags.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local2.nntp.dca.giganews.com!nntp.earthlink.com!news.earthlink.com.POSTED!not-for-mail NNTP-Posting-Date: Wed, 29 Jun 2011 21:26:59 -0500 Date: Wed, 29 Jun 2011 19:26:50 -0700 From: Patricia Shanahan User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.18) Gecko/20110616 Thunderbird/3.1.11 MIME-Version: 1.0 Newsgroups: comp.lang.java.programmer Subject: Re: StringBuilder Difficulties References: <9v7n071ns1n0plisods3m2pi6q68rtket5@4ax.com> <90mn07h4ul4g3ppijpku1uc3iocc4a7pl0@4ax.com> In-Reply-To: <90mn07h4ul4g3ppijpku1uc3iocc4a7pl0@4ax.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Message-ID: Lines: 16 X-Usenet-Provider: http://www.giganews.com NNTP-Posting-Host: 70.230.196.78 X-Trace: sv3-IHOxLmOEz7RH78cfSjNiKYMDyXeibyze9OFsyCiux2JeHknTWiNusCN+2D5+mGyn49gCmwk0UbEbgDB!JsIOXYVyB2wlHStq1LYrVTZNOCaVM1yifeaiRGofSGaAt/fnJnHjO18YJf3vJs5/2R0lOHNp6EsV!FCM0w5BZO/eI1O7lLjFil9DTaB9bWg+xLWvPRH1AsYsbiw== X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.40 X-Original-Bytes: 1867 Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:5793 On 6/29/2011 6:58 PM, Gene Wirchenko wrote: > On Wed, 29 Jun 2011 15:52:46 -0700, Patricia Shanahan > wrote: > > [snip] > >> It is relatively rare to decide, part way through a build, to throw away >> the work so far and begin again with entirely different contents. > > I am going to be doing it in a loop. why create a new object > each iteration? If each iteration is doing a new string build, I'd create a new StringBuilder for it. Patricia