Explain me what is the difference between String, StringBuffer andStringBuilder?

Submitted by: Muhammad
String is an immutable class. In older JDK's the recommendation when programmatically building a String was to use StringBuffer since this was optimized to concatenate multiple Strings together. However, the methods on StringBuffer were marked as sychronized, which meant that there was a performance penalty, hence StringBuilder was introduced to provide a non-synchronized way to efficiently concatenate and modify Strings.
Submitted by: Muhammad

Read Online Full Stack Developer (Java) Job Interview Questions And Answers