GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Interview Questions  >  J2EE  >  Core Java
Go To First  |  Previous Question  |  Next Question 
 Core Java  |  Question 428 of 502    Print  
What is the difference between StringBuffer and StringBuilder class?

  
Total Answers and Comments: 3 Last Update: March 11, 2008     Asked by: sujatham 
  
 Sponsored Links

 
 Best Rated Answer
Submitted by: sujatham
 
The StringBuffer's API is the same as the new StringBuilder's API, except that StringBuilder's methods are not synchronized for thread safety.

Above answer was rated as good by the following members:
timmireddy, ravi.shashi.mishra
August 09, 2007 05:20:01   #1  
sujatham Member Since: January 2006   Contribution: 142    

RE: What is the difference between StringBuffer and St...
The StringBuffer's API is the same as the new StringBuilder's API except that StringBuilder's methods are not synchronized for thread safety.
 
Is this answer useful? Yes | NoAnswer is useful 2   Answer is not useful 0Overall Rating: +2    
September 11, 2007 02:26:02   #2  
gptnitesh Member Since: September 2007   Contribution: 11    

RE: What is the difference between StringBuffer and St...

StringBuilder is introduced in java 1.5

StringBuffer is designed to be thread-safe and all public methods in StringBuffer are synchronized. StringBuilder does not handle thread-safety issue and none of its methods is synchronized.

StringBuilder has better performance than StringBuffer under most circumstances.


 
Is this answer useful? Yes | NoAnswer is useful 1   Answer is not useful 0Overall Rating: +1    
March 11, 2008 07:02:03   #3  
sampra Member Since: February 2008   Contribution: 278    

RE: What is the difference between StringBuffer and StringBuilder class?
String builder has been implemented in 1.5 can any one expalin me in detail
 
Is this answer useful? Yes | No


 
Go To Top


 Sponsored Links

 
About Us -  Privacy Policy -  Terms and Conditions -  Contact -  Ask Question -  Propose Category -  Site Updates 

Copyright © 2005 - 2009 GeekInterview.com. All Rights Reserved

Page copy protected against web site content infringement by Copyscape