String Buffer is a peer class of string that provides much of the functionality OF STRINGS. String represents fixed length, immutable character sequences. In contrast string buffer represents grow able and writable character sequences. String buffer may have characters and sub strings inserted in the middle or appended to the end. String buffer will automatically grow to make room for such additions and often has more characters preallocate than are actually needed, to allow room for growth. Java uses both classes heavily, but many programmers deal only with string and let Java manipulate string buffers behind the scenes.
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment