From: pachl Date: 2008-02-20T09:35:14+09:00 Subject: Re: String Concatenation and Implicit Object Creation On Feb 19, 4:45 pm, Tim Hunter wrote: > pachl wrote: > > Do adjacent strings or strings separated by backslash and a newline > > create multiple String objects? > > > For example: > > > s1 = 'asdf' 'qwer' > > > s2 = 'asdf'\ > > 'qwer' > > > I don't know how to figure this out, but I ran benchmarks and compared > > against '<<' and '+' and it looks like each example above only creates > > a single String object. What's really happening? > > > -pachl > > The string concatenation method is "+" > > s1 = "asdf" + "qwer" > > This creates 3 string objects, "asdf", "qwer", and "asdfqwer". Of course it does, that's not my question. Anyway, going off your reply, how many strings does the following create? s1 = 'asdf' 'qwer'