what is the difference between String and StringBuffer classes?

Answers were Sorted based on User's Feedback



what is the difference between String and StringBuffer classes?..

Answer / kishore cheruku

a) String objects are constants and immutable whereas StringBuffer objects are not. b) String class supports constant strings whereas StringBuffer class supports growable and modifiable strings.

Is This Answer Correct ?    23 Yes 0 No

what is the difference between String and StringBuffer classes?..

Answer / tarun choudhary

The String class is used for strings that are not allowed to change. The StringBuffer class is used for strings that may be modified by the program.

Is This Answer Correct ?    15 Yes 0 No

Post New Answer

More Core Java Interview Questions

Why can't we make jsp as a controller and action servlet in struts?

8 Answers   TCS, Wipro,


What is stringbuffer in java?

0 Answers  


What is the final access modifier in java?

0 Answers  


Is string a wrapper class?

0 Answers  


What is the use of parse function in java?

0 Answers  






Is java is a fully object object oriented language?

31 Answers   TCS,


What are constants?

0 Answers  


define polymorphism in java

0 Answers  


Why is the type for real numbers called double?

0 Answers  


How can you sort dates?

2 Answers   TCS,


Can you have two constructors in java?

0 Answers  


How do you add an arraylist to an array in java?

0 Answers  


Categories