1. Similarities and differences

String: immutable sequence of characters, stored at the bottom using char[]

StringBuffer: a variable sequence of characters; Thread safety and low efficiency; The bottom layer uses char[] for storage

StringBuilder: mutable character sequences; Threads are unsafe and efficient. The bottom layer uses char[] for storage

They appear in order from morning to night

2. Method summary of StringBuffer

Add: append ()

Delete: delete(int start,int end)

SetCharAt (int n,char ch)/replace(int start,int end,String STR)

Check: charAt (int n)

Insert: insert (int offset, XXX)

Length: length ()

Traversal: for + charAt ()

The concept of method chains

Methods chain: append (). Append ();