Results 1 to 2 of 2
  1. #1
    Jithu is offline Member
    Join Date
    Oct 2010
    Posts
    2
    Rep Power
    0

    Default Synchronisation Issue?

    Hi,

    Could anyone please give me a code that explains the main difference of synchronization between a StringBuilder and a StringBuffer?

  2. #2
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,773
    Blog Entries
    7
    Rep Power
    21

    Default

    Quote Originally Posted by Jithu View Post
    Hi,

    Could anyone please give me a code that explains the main difference of synchronization between a StringBuilder and a StringBuffer?
    A StringBuilder doesn't synchronize anything itself while a StringBuffer synchronizes all its methods that change the internal char buffer. Compare those two classes with an ArrayList versus a Vector.

    kind regards,

    Jos

Similar Threads

  1. Synchronisation problem
    By Joshy910 in forum SWT / JFace
    Replies: 3
    Last Post: 08-12-2010, 04:52 PM
  2. JSF issue
    By premjo in forum New To Java
    Replies: 0
    Last Post: 02-14-2010, 03:19 PM
  3. Issue
    By FlashNinja in forum New To Java
    Replies: 20
    Last Post: 11-28-2009, 10:44 PM
  4. thread synchronisation
    By nabila.abdessaied in forum Threads and Synchronization
    Replies: 0
    Last Post: 04-01-2009, 06:11 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •