indra negi wrote:Please let me know if there is any relationship between the size of the collection and the time taken to retrieve the item from the collection.
Of course, there is a relationship. This is something that you have (or will study) in your data structures class, in school. This is why Java has different types of collections -- based on array, linking, and hashing implementations.
As for time to retrieve... Array is O(n) to find, could be less if it is sorted (binary search is O(log N)), and O(1) if you know the index. Linked based is O(n) to find. And hashing is O(1) to find, if it is hashed right.
As Henry pointed out, it depends on the collection in question. The worst case scenarios are explained in detail in data structure tutorials / articles / books. The SCJP exam will not quiz you on this knowledge though