J2SE 5.0: be aware of StringBuffers

written by juan on July 5th, 2005 @ 12:00 AM

Reading New Features and Enhancements J2SE 5.0 (thanks Cono) I discover:
StringBuilder class - The addition of a new class StringBuilder that works essentially as an unsynchronized StringBuffer for performance enhancement. You should replace all StringBuffer uses with StringBuilder unless you need the synchronization (which you almost certainly don't). StringBuilder is almost always faster than StringBuffer.
be aware of the new class!!

Comments are closed

Options:

Size

Colors