Difference between String & StringBuffer

Answer Posted / kunal chwala

It means that we cant change the content of String once created. If we try append a new string using + operator
then it creates new String object.
ex.

Is This Answer Correct ?    13 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between access specifiers and access modifiers in java? 16

529


what is synchronization and why is it important? : Java thread

575


What is widening and narrowing in java? Discuss with an example.

548


What do u mean by variable?

557


What is the purpose of garbage collection in java? When is it used?

530






What is immutable class in java?

506


How can we pass argument to a function by reference instead of pass by value?

574


What is the final class modifier?

551


When should the method invokelater() be used?

570


Difference between arraylist and hashset in java?

528


How does arrays sort work in java?

585


What is ternary operator? Give an example.

587


Why strings in java are called as immutable?

584


What occurs when an object is constructed?

556


What is the difference between a break statement and a continue statement?

587