what is the difference between String and StringBuffer classes?

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the biggest integer?

806


What do you mean by Hash Map and Hash Table?

808


How we create object in copy constructor?

869


What is stack example?

774


What are the types of methods in java?

784


How do you input a string in java?

744


Is there a way to increase the size of an array after its declaration?

805


Can you explain inner class.

823


What is method reference in java?

820


What is constructor chaining in java?

823


What is concurrent hashmap and its features?

758


Which collection is best for sorting in java?

890


What is hashmap in java?

813


Does the order of public and static declaration matter in main method?

838


What do you know about the garbage collector?

857