Difference between a String and Stirng Buffer?

This question is related to Oracle Interview

Showing Answers 1 - 3 of 3 Answers

Lavanya

  • Apr 14th, 2005
 

String object value are constant. StringBuffer object values can be modified and they can be growable. 
 
In StringBuffer, values can be inserted anywhere(even in the middle), but it is not possible with String.

  Was this answer useful?  Yes

Kiran Saluja

  • Mar 18th, 2006
 

String represents fixed-length, immutable character sequences. String Buffer represents growable and writeable character sequences.

  Was this answer useful?  Yes

riyaz

  • Mar 19th, 2007
 

 
String object value are constant. StringBuffer object values can be modified and they can be growable. 
 
In StringBuffer, values can be inserted anywhere(even in the middle), but it is not possible with String.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions