What is the replace() method of the StringBuffer class?
Are you preparing for IT certification? With practice questions, study notes, interactive quizzes, tips and technical articles, uCertify PrepKits ensure that you get a solid grasp of core technical concepts to ace your certification exam in first attempt.
What is the replace() method of the StringBuffer class?
Rating:
The replace() method of the StringBuffer class replaces one set of characters with another set inside a StringBuffer object. The syntax of using the replace() method is as follows:
The substring, which is to be replaced, is specified by the indexes- startIndex and endIndex. The substring starting from startIndex to endIndex-1 is replaced. The substitute string is passed in str.
Rating:
Was this information helpful?
Other articles
- What is a Java applet?
- What are the Timer and TimerTask classes?
- What is aggregation?
- What is ebXML?
- How to install an RMI application?