String vs StringBuilder
1. Why Strings Are Immutable
In Java, String objects are immutable, which means their values cannot be changed after they are created.
Example
String s = "apple";
s = s + " pie";
System.out.println(s
ejjung.hashnode.dev3 min read