Question on generics
Posted: Mon Sep 23, 2013 2:58 pm
Hi,
This is all really confusing.
Is the following summary correct? It certainly would be easier to remember if so:
"If you declare a Collection or Map reference type variable using the wildcard operator you cannot add elements/entries to the object that is referenced by the variable."
Is that correct?
Thanks.
This is all really confusing.
Is the following summary correct? It certainly would be easier to remember if so:
"If you declare a Collection or Map reference type variable using the wildcard operator you cannot add elements/entries to the object that is referenced by the variable."
Is that correct?
Thanks.