java tutorial - Java StringBuffer replace() method - java programming - learn java - java basics - java for beginners
Learn Java - Java tutorial - Java stringbuffer replace - Java examples - Java programs
Description
The replace () method — replaces the specified characters in the string with the substring of the given buffer string (StringBuffer).
- In other words, the method allows in Java to replace the characters in the string between the specified start and end indexes.
Syntax
Syntax method:
Options
Detailed information about the parameters:
- start - initial index, inclusive;
- end - end index, not including;
- str is a string that will replace the previous contents.
Return value
- In Java replace (), returns the modified SringBuffer object.