What does <?> Mean in the signature of an Android method?
1 answer
AdapterView
is a generic class. A different data type is required as a parameter, and its operation is then tuned to this type in some way. Usually you declare AdapterView
something like
AdapterView<String> avs = new AdapterView<String>(...);
This applies to the AdapterView
configured for String
s.
Now, considering all this: <?>
Means that this method will accept an AdapterView
regardless of the class for which it is configured. This is a wildcard type specifier.
+6