String vs StringBuilder vs StringBuffer in Java
A string is a sequence of characters. In Java, String objects are immutable, which simply means once created, their values can not be changed. In Java, String, StringBuilder, and StringBuffer are used for handling strings. The main difference is:String: Immutable, meaning its value cannot be changed