Tuesday, 20 August 2013

What is the point of Collection

What is the point of Collection

I have been reading Effective Java and I have come across the unbounded
Collection type <?>. However, the reading has led me to believe that you
can't put any elements, other than null, into an instance of
Collection<?>. Therefore, my question is this: What is the purpose of
instantiating a Collection<?> when we can only insert null elements as
that just seems pointless. I've been trying to figure this concept, but it
just doesn't seems to make much sense. Any help would be much appreciated.

No comments:

Post a Comment