We will find an answer for the following questions
- What is StringBuilder
- Available Constructors
- Commonly used methods
- Java StringBuilder class is used to create a mutable (modifiable) string.
- The Java StringBuilder class is the same as the StringBuffer class except that it is non-synchronized.
- So its not thread-safe and can’t be used if Objects are shared among multiple threads.
- It is available since JDK 1.5.
- If sb refers to an instance of a StringBuilder, then sb.append(x) has the same effect as sb.insert(sb.length(), x)
Commonly used Methods