How to compare stringbuffers in java?? | Sololearn: Learn to code for FREE!

How to compare stringbuffers in java??


8th Aug 2018, 1:34 PM
pranjali more
pranjali more - avatar
2 Answers
+ 3
All methods in StringBuffer class are synchronised. StringBuffer came in java 1.0 version. StringBuffer class is thread safe. Performance wise we can't use this class because only one task is execute at a time. And we can change the existing object in StringBuffer class. this changeable behaviour is known as mutable..
8th Aug 2018, 11:15 PM
P∆WAN M∆URY∆ - avatar
I think if (Nameofstringbuffer.equals ()); can be used i m not 100 %sure
8th Aug 2018, 1:38 PM
Nitesh Kumar Pandey
Nitesh Kumar Pandey - avatar