Java StringBuffer delete() method is used to delete a part of the string. A StringBuffer instance represents a character sequence. We can delete a portion… [Read More]
Java StringBuffer insert()
Java StringBuffer insert() method is used to insert the given element at the specified position in this character sequence. Syntax of insert() method //insert string “hello”… [Read More]
Java StringBuffer setLength() Method
Java StringBuffer setLength() method is used to set a new length to the existing StringBuffer sequence. If the new length is greater than the current… [Read More]
Java StringBuffer deleteCharAt() Method
In this guide, we will discuss the Java StringBuffer deleteCharAt() method with examples. Syntax of deleteCharAt() Method: sb.deleteCharAt(4); //deletes char present at index 4 Here… [Read More]
Java StringBuffer appendCodePoint() Method
Java StringBuffer appendCodePoint(int codePoint) Method appends string representation of the specified code point to this sequence. In this guide, we will discuss appendCodePoint() method with… [Read More]
Java StringBuffer append() Method
The append() method of Java StringBuffer class is used to append a specified value at the end of this character sequence. Syntax of append() Method: //append string… [Read More]
Java StringBuffer class With Examples
Java StringBuffer class is used to create mutable strings. A mutable string is the one which can be modified. StringBuffer is an alternative to Java… [Read More]
Java – How null works with StringBuffer
You should be careful while appending nulls to StringBuffer as it may result in the unexpected output (if you are not aware how null works… [Read More]
Java – How to append a newline to StringBuffer
When we append the content to a StringBuffer object, the content gets appended to the end of sequence without any spaces and line breaks. For… [Read More]
Difference between String and StringBuffer
In this article, we will discuss the difference between String and StringBuffer. Both of these classes used to handle sequence of characters. However they are… [Read More]
Java StringBuffer substring()
In this tutorial, we will discuss the Java StringBuffer substring() method with the help of examples. The syntax of substring() method is: sb.substring(4) //substring starting… [Read More]
Java StringBuffer replace()
In this tutorial, we will discuss Java StringBuffer replace() method with the help of examples. Syntax of replace() method: //replace substring from index 4 to… [Read More]