When I read the Java source code that I found in the collection interface, it will be safe
The returned array will be "safe" because references to it are not supported. (In other words, this method should allocate a new array, even if this collection is supported by the array). Thus, the caller is free to modify the returned array.
I do not understand the point, can you give an example for me?
source share