Difference between String and StringBuffer.

Answer Posted / minu

hi
i am agree with Madhu ,
String is an immutable object. StringBuffer is a mutable
object.
immutable object:If you are not allowed to change the value
of an object, it is immutable object.

mutable object: If a object value is changeable then we can
call it as Mutable object.

Is This Answer Correct ?    14 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between stringbuffer and stringbuilder class?

574


What is a treemap in java?

543


How does java pattern compile work?

549


What are the characteristics of Final,Finally and Finalize keywords.

705


What are latest features introduced with java 8?

593






what do you mean by java annotations?

552


Why map is used in java?

583


What is stack example?

549


Objects or references which of them gets garbage collected?

534


What is callablestatement? How you can call stored procedure to pass in parameter?

545


Why are pointers not secure?

539


Is java 9 released?

526


What is a module function?

559


How to sort numbers in java without array?

533


What is the difference between path and classpath variables?

532