In this tutorial, we will discuss the Java StringBuilder substring() method with the help of examples. The syntax of substring() method is: sb.substring(4) //substring starting… [Read More]
Java StringBuilder Class With Examples
StringBuilder in Java is used to create mutable strings. A mutable string is the one which can be modified instead of creating new string instance…. [Read More]
Java StringBuilder charAt()
In this tutorial, we will discuss the Java StringBuilder charAt() method with the help of examples. The syntax of charAt() method is: sb.charAt() Here, sb… [Read More]
Java StringBuilder capacity() Method
Java StringBuilder capacity() method returns the current capacity of StringBuilder object. In this tutorial, we will discuss the capacity() method in detail with the help… [Read More]
Java StringBuilder append() Method
The append() method of Java StringBuilder class is used to append a specified value at the end of this character sequence. Syntax of append() Method:… [Read More]
StringBuilder append() null values as “null” String
While working with StringBuilder you may have come across a strange behaviour of append() method for null values. If you append a null value to… [Read More]
How to append a newline to StringBuilder
There are following two ways to append a new Line to a StringBuilder object:1) StringBuilder.append(“\n”);2) StringBuilder.append(System.getProperty(“line.separator”)); Example In this example we have a StringBuilder object… [Read More]