This week's book giveaway is in the
We're giving away four copies of a choice of
"Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac"
and have Joe Kissell on-line!
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
Take Control of Upgrading to Yosemite
Take Control of Automating Your Mac
this week in the
Programmer Certification (SCJP/OCPJP)
Regarding StringBuffers and StringBuilders
Joined: Nov 30, 2009
Dec 07, 2009 08:04:59
can you explain to me
what is the common use for StringBuffers and StringBuilders
Joined: Mar 01, 2007
Dec 07, 2009 08:08:43
The only difference between
is unsynchronized whereas
is synchronized. So when the application needs to be run only in a single thread then it is better to use
is more efficient than
Chintan Patel, SCJP1.5,
Joined: Oct 30, 2009
Dec 07, 2009 08:25:31
classes are both used to create mutable
objects which is not possible with String class the only difference between the two is already stated by chintan.
SCJP 1.6 96%
Joined: Dec 16, 2009
Dec 16, 2009 05:33:41
was added in
5 API it's same as
except is not thread safe
is faster then
as performance point of view.
Joined: Nov 04, 2009
Dec 16, 2009 11:26:29
well common use could be if we want mutable string objects
and both are used as an alternative to stiring
subject: Regarding StringBuffers and StringBuilders
StringBuffer & StringBuilder and equals()
Reversing String Not Working...
The Difference Between StringBuffer & StringBuilder
Synchronizing Block code
Converting an decimal int to a hex without using Integer.toHexString
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014