Difference between String & StringBuffer

Answer Posted / ramesh raju

String s1="prabas";
String s2="raju";
String s3=s1.concat(s1);//s1=s2.concat("xyz") its not work
We didn't chang the content of s1,s2 strings
that's y String is Immutable

where as StringBuffer is mutable we can easly modified the
content

Is This Answer Correct ?    26 Yes 43 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How will you get the platform dependent values like line separator, path separator, etc., ?

589


When can you say a graph to be a tree?

637


What does business logic mean?

506


What is local declaration?

492


What is the association?

557






Will set allow duplicates in java?

504


What is the significance of continue jump statement? Explain with an example.

743


What is numeric function?

542


What does java se mean?

591


what is session in java?

755


What is instance means in java?

566


What all access modifiers are allowed for top class ?

713


How many bytes is a string?

565


What is dot operator?

574


How do I start learning java?

560