<<< StringBuilder memory buffer | Index | StringBuilder append( ) example >>> |
Common methods of the StringBuilder class are:
capacity() // get capacity length() // get logical length setLength(intNumOfChars) // set logical length append(value) // adds characters at the end insert(index, value) // inserts characters at specific location replace(startIndex, endIndex, String) delete(startIndex, endIndex) deleteCharAt(index) // removes one character setCharAt(index, character) //changes characters at specified position charAt(index) //returns character at specified position substring(index) // from index to the end substring(startIndex, endIndex) toString() // convert StringBuilder to String
<<< StringBuilder memory buffer | Index | StringBuilder append( ) example >>> |