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

What do you mean by aggregation?

563


What is == in java?

563


What does singleton mean in java?

508


Mention the default values of all the elements of an array defined as an instance variable.

518


Do you need to import math in java?

557






What is use of static in java?

519


Hi i am creating desktop application in that i want calling to mobile number. i have java telephone api (JTAPI) but i dont understand how it configure & use plese help me

1358


Is alive in java?

502


In Java list the methods that can be overridden?

566


Can list be final in java?

485


When to use runnable interface vs thread class in java?

514


Is double bigger than float?

543


What is java in simple terms?

554


What does method mean?

510


Is Java a dying language?

569