The thread safe StringBuffer class has a replacement in the form of StringBuilder .It doesnot have synchronized methods so it works much faster .So if you are performing a number of string operations in a single thread you will gain a tremendous performance while using this class .The string builder class consist of mutable sequence of charecters
.It provides an API ,which is compatible with StringBuffer,but there is no guarntee of its sychronization.This class is designed in such a way that it can be used as a drop in replacement
for StringBuffer in places
No comments:
Post a Comment