differnce between string string buffer and atring builder code example
Example: string builder vs string buffer
String vs StringBuilder vs StringBuffer:
String: Immutable version char sequences
StringBuilder: mutable version char sequences,
not synchronized
StringBuffer: mutable version char sequences,
synchronized , thread-safe, slow
String str = new String("a")
StringBuilder s2 = new StringBuilder("B") // MUTABLE
StringBuffer s2 = new StringBuffer("c") // Synchronized