what is mean by String and StringBuffer?
What is mean by Methooverriding and Overloading?

Answer Posted / raja papaiah. m

When you create a string object, you are creating a string
that cannot be changed. this once a string object has been
created, you cannot change the character that comprise that
string. at first that may seem to be a serious restriction.
However, such is not the case. You can still perform all
types of string operations. The difference is that each time
you need an altered version of existing string,a new string
object is create that contains the modifications. The
original string is left unchanged. this approach is used
because fixed, immutable strings can be implemented more
efficiently than changeable ones. For those cases in which a
modification string is desired, Java provides two options:
StringBuffer and StringBuilder Both hold strings that can be
modified after they are created

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain the difference between comparator and comparable in java?

475


What do you mean by collectors in java 8?

527


Why for each loop is used?

490


What are different ways of object creation in java ?

558


What are different types of arrays?

514






What is method overloading in java ?

544


Is static a keyword in java?

510


Can you call a method in a method?

513


What class allows you to read objects directly from a stream?

849


What is the base class of all classes?

556


Can two objects have same hashcode?

553


Why are arrays useful in java?

534


Why does the integer quotient -0/3 yield 0, but the double quotient -0.0/3.0 yields – 0.0?

592


How do you end a program?

532


What is replacefirst in java?

557