We will find answer for following questions
- What is StringBuilder
- Available Constructors
- Commonly used methods
- Java StringBuilder class is used to create mutable (modifiable) string.
- The Java StringBuilder class is same as StringBuffer class except that it is non-synchronized.
- So its not thread safe and can’t be used if Objects are shared among multiple thread.
- 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