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

What are the performance implications of interfaces over abstract classes?

1 Answers  


What is time complexity java?

0 Answers  


what is the form of storage space in java?

5 Answers  


Explain the scope or life time of class variables or static variables?

0 Answers  


What is linked hashmap and its features?

0 Answers  


can we add two numbers without using arthematic operators? if possible how?

5 Answers   CTS,


Can an exception be rethrown?

4 Answers   Wipro,


How do you create a null object?

0 Answers  


why Java does not support multiple inheritances?

0 Answers   Aspire,


What is the difference between dom and sax parser in java?

0 Answers  


take an array with -ve and +ve value both.find out the nearest value of 0(zero).if two values are same like(-2 and +2)then extract +2 is nearest of 0(zero).

0 Answers  


What is the difference between the jdk 1.02 event model and the event-delegation model introduced with jdk 1.1?

0 Answers  


Categories