I was recently told that collection should be preferred to List as the return value of an EJB method. The argument is that in general collection is more generic i.e. gives you to change the underlying data structure without impacting the clients. And if this is the flexibility you want to have as a designer then using collection will make better sense. But then wouldn't it make more sense to return just an array instead of collection?
And what are performance impacts if any?
Thanks in advance.