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

How many characters is 2 bytes?

0 Answers  


Name container classes in java programming?

0 Answers  


Explain importance of finally block in java?

0 Answers  


Give me some null interfaces in java?

0 Answers  


Differentiate between stringbuffer and string?

0 Answers  






What is method overriding in java ?

0 Answers  


What is oop principle in java?

0 Answers  


What is the purpose of abstract class?

0 Answers  


Explain java coding standards for constants?

0 Answers  


What is return in java?

0 Answers  


What will happen if non-synchronized method calls a static synchronized method and what kind of lock it acquires?

0 Answers  


What are the different types of inner classes?

0 Answers  


Categories