GeekInterview.com
   Home |  Tech FAQ  |   Interview Questions |  Placement Papers |  Tech Articles |  Learn |  Freelance Projects |  Online Testing |  Geeks Talk |  Job Postings |  Knowledge Base | Site Search |  Add/Ask Question

GeekInterview.com  >  Interview Questions  >  J2EE  >  Java
Go To First  |  Previous Question  |  Next Question 
 Java  |  Question 235 of 923    Print  
What is the difference between String and StringBuffer

  
Total Answers and Comments: 6 Last Update: December 24, 2006   
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
June 09, 2005 17:18:10   #1  
saripella        

RE: What is the difference between String and StringBuffer
Strings are immutable whereas StringBuffers are mutable.
 
Is this answer useful? Yes | No
August 08, 2005 09:41:37   #2  
Ramesh        

RE: What is the difference between String and StringBuffer
String are once created, we can't modify it. Any such attempt will create a new string. In Stringbuffer one can can the insert,delete,append character after it is created. String values are resolved at compile time. So if we know the exact size of the string to be appended, better use String object. In StringBuffer values resolved at runtime, one can appened any number of String.only one StringBuffer is used to hold. No new object will be created. which is very fast
 
Is this answer useful? Yes | No
November 02, 2005 03:46:42   #3  
Rajesh Sakhamuri        

RE: What is the difference between String and StringBuffer

String is the immutable we canot modify the string object, whereas StringBuffer is mutable,we can modify the stringobject.perfomance of string is more than the string buffer at runtime.


 
Is this answer useful? Yes | No
November 02, 2005 03:51:30   #4  
Rajesh Sakhamuri        

RE: What is the difference between String and StringBu...
Strings are immutable whereas StringBuffers are mutable.perfomance of string is more than the string buffer during the runtime.
 
Is this answer useful? Yes | No
November 02, 2005 03:53:21   #5  
Rajesh        

RE: What is the difference between String and StringBu...
String is the immutable we canot modify the string object, whereas StringBuffer is mutable,we can modify the stringobject.perfomance of string is more than the string buffer at runtime.By Rajesh
 
Is this answer useful? Yes | No
December 24, 2006 12:39:59   #6  
sivanesh.a Member Since: December 2006   Contribution: 190    

RE: What is the difference between String and StringBu...

STring - immutable

stringbuffer-mutable


 
Is this answer useful? Yes | No


 
Go To Top


 Sponsored Links

 




About Us  |   Privacy Policy  |   Terms and Conditions  |   Contact  |   Site Map  |   Add Question  |   Propose Category  |   RSS Feeds  |   Articles Sitemap  |   Site Updates  |   Add Resource

Copyright © 2005 - 2008 GeekInterview.com. All Rights Reserved
Page copy protected against web site content infringement by Copyscape