Differentiate between StringBuffer and StringBuilder in Java programming.

  • 3 Replies
  • 702 Views
*

sinelogixtech

  • Hero Member
  • *****
  • 953
  • +0/-0
    • View Profile
Differentiate between StringBuffer and StringBuilder in Java programming.

*

Adrian

  • Newbie
  • *
  • 12
  • +0/-0
    • View Profile
There are many differences between the two, but the biggest one is StringBuffer is thread safe while the StringBuilder is not. This is why Since Java5 StringBuffer is used more.

*

12Three

  • Full Member
  • ***
  • 176
  • +0/-0
    • View Profile
    • 12Three
StringBuffer is mutable means one can change the value of the object . The object created through StringBuffer is stored in the heap. StringBuffer has the same methods as the StringBuilder , but each method in StringBuffer is synchronized that is StringBuffer is thread safe .

*

RH-Calvin

  • Hero Member
  • *****
  • 1399
  • +0/-0
    • View Profile
    • Reprise Hosting
StringBuffer is mutable means one can change the value of the object . The object created through StringBuffer is stored in the heap. StringBuffer has the same methods as the StringBuilder , but each method in StringBuffer is synchronized that is StringBuffer is thread safe.
Cheap VPS | $1 VPS Hosting
Cheap Dedicated Servers | Free Setup with IPMI

 




See Our Webmaster Tools for Windows and Mac

A1 Sitemap Generator
      
A1 Website Analyzer
      
A1 Keyword Research
      
A1 Website Download
      
A1 Website Search Engine
      
A1 Website Scraper