Wildcard (Java): Difference between revisions

Content deleted Content added
Ruud Koot (talk | contribs)
see also: Bounded quantification
Ruud Koot (talk | contribs)
use-site vs. definition-site
Line 1:
The '''wildcard''' <code>?</code> in [[Java (programming language)|Java]] is a special actual parameter for the instantiation of [[Generics in Java|generic]] (parameterized) types. It can be used for the instantiation, not in the definition of a generic unit. Thus, a wildcard is a form of ''use-site'' [[variance annotation]] (contrast this with the ''definition-site'' variance annotations found in [[C Sharp (programming language)|C#]] and [[Scala (programming language)|Scala]]). This article summarizes the most important rules for its use.
 
== Covariance for generic types ==