string str list . tostring();
-
Common string toString ()
Returns a string representation of the collection. A string representation consists of a series of collection elements, which are arranged in the order returned by the iterator and enclosed in square brackets ("[]"). Adjacent elements are separated by the character ","(comma plus space). You can convert an element into a string through String.valueOf(Object).
This implementation creates an empty stringbuffer area, appends a left square bracket, and then traverses the collection, appending the string representation of each element in turn. After each element is appended (except the last element), the string ""will be appended. Add a right parenthesis at the end. Get a string from stringbuffer and return it.