The difference between String and StringBuffer is that StringBuffer is mutable while String is not.So String.replace(...) will create a new String. StringBuffer.repleace(...) will use the same StringBuffer object. Actually for the StringBuffer case, even if you use text.append("c"); The result will be the same.
4》 wait for the t thread to die before continue processing.
5》 Well, inside the operate(..) function, y is indeed "ab" if you want to print the value. But remember this y is only a copy of the a, which is a pointer to the original "b". So y=x just let y points to "ab", then this y is discarded, the b outside of the function remains the same.
6》Why don't you agree with it? Hashtable can put key and value, it is a kind of Map.
12》 Address. Address does not change. Value inside changed.