On Thu, Oct 7, 2010 at 6:40 PM, DanH <[email protected]> wrote:
> Right.  The main difference is that StringBuffer is threadsafe, and
> nothing else in Android is threadsafe, so little point in using
> StringBuffer.

Well,
there are few places, where Java (Android) are thread safe (Vector,
Stack, few classes in javax.nio.* and quite few classes in
java.util.concurrent.*)
If String modification is happening by multiple actors (user generated
events, network) then it makes sense using StringBuffer.

> (That said, the performance edge of StringBuilder over StringBuffer is
> unlikely to be noticed.)

True

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to