Yahoo Interview Question
Software Engineer / Developersjavapractices.com/topic/TopicAction.do?Id=29
When an array or list of any other object is present one needs to return an copy of the object rather than the reference, This will make sure that "immutable" object is really immutable. The calling code can later even modify the returned list or array since caller would be working with a new copy of the list.
This would answer most of your questions:
- sdm February 28, 2010java.sun.com/docs/books/tutorial/essential/concurrency/immutable.html