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 are the 3 types of control structures?

606


Explain java coding standards for constants?

667


Can variables be used in java without initialization?

642


What is udp in java?

640


What is var keyword ?

814






Which is the best approach for creating thread ?

821


What does string intern() method do?

690


Can we store variables in local blocks?

890


Who developed java?

647


What is difference between printf and scanf?

603


Explain differences between collection api and stream api?

709


How do you sort a string in alphabetical order in java?

627


What is sleep method?

702


What is volatile data type?

630


Can you create an object of an abstract class?

653