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

What are the 4 versions of java?

564


What is class and object in java?

559


Draw a UML class diagram for the code fragment given below: public class StringApplet extends Applet { private Label sampleString; private Button showTheString; private ButtonHandler bHandler; private FlowLayout layout; public StringApplet() { sampleString = new Label(" "); showTheString = new Button (" Show the String"); bHandler = new ButtonHandler(); layout = new FlowLayout(); showTheString.addActionListener(bHandler); setLayout(layout); add(sampleString); add(showTheString); } class ButtonHandler implements ActionListener { public void actionPerformed(ActionEvent e) { samplestring.setText("Good Morning"); } } } Note: The methods need not be indicated on the diagram.

1590


What is the difference between jfc & wfc?

599


What is autoboxing in java?

612






Why string objects are immutable in java?

568


What is oop in java?

533


What is the static block?

586


5 Coding best practices you learned in java?

640


What are different types of inner classes ?

563


Explain heap sort?

702


What isan abstract class and when do you use it?

847


What is internal iteration in java se 8?

631


Are arrays primitive data types?

641


How many bits is a string?

526