/* related posts with thumb nails */

Difference between String and StringBuffer:

The few differences between String and StringBuffer are listed below.

· StringBuffer objects must ne instantiated using ‘new’. But, Strings can be instantiated without using ‘new’.

· StringBuffer objects are mutable (self changeable). Where as, String objects are immutable.

· StringBuffer provides functions like setCharAt(), deleteCharAt() and etc.

· StringBuffer allocates extra 16 bits of memory

· StringBuffer can be treated as a dynamic string.

Related Topics:


Post a Comment