"Shallow" and "deep" aren't rigorously defined, so I'll try to
answer without using those terms ...
The Collection contains reference values that (if non-null) point
to objects. The array generated by toArray() contains copies of those
reference values, pointing to the same objects. Once created, the
Collection and the array are independent in the sense that modifying
one has no effect on the other. If the pointed-to objects are mutable,
modifications made via the array's references are visible via the
Collection's references, and vice versa.
--
eso...@comcast-dot-net.invalid
"Don't be afraid of work. Make work afraid of you." -- TLM