M
Murat Tasan
what is the primary difference (other than clarity) between using these
two method declarations?
public void myMethod(Set<?> x);
public void myMethod(Set<? extends Object> x);
basically, during compile time, does every <?> get replaced with <?
extends X> where X is the upper bound found for the appropriate
class/interface reference?
i would think so, but i have seen some compilation warnings and errors
that have planted doubt in my mind.
unfortunately, i am having great difficulty in finding the appropriate
documentation regarding this... and i just don't have the time to
experiment enough to decode the differences.
thanks.
two method declarations?
public void myMethod(Set<?> x);
public void myMethod(Set<? extends Object> x);
basically, during compile time, does every <?> get replaced with <?
extends X> where X is the upper bound found for the appropriate
class/interface reference?
i would think so, but i have seen some compilation warnings and errors
that have planted doubt in my mind.
unfortunately, i am having great difficulty in finding the appropriate
documentation regarding this... and i just don't have the time to
experiment enough to decode the differences.
thanks.