What does the question mark in java mean?

java

Solution

In Java `?` is known as Wildcard, you can use it to respresent an `unknown type`.

The upper bounded wildcard, , where Foo is any type, matches Foo and any subtype of Foo. The process method can access the list elements as type Foo:

public static void process(Map<? extends A> list) {
  /* code */
}

In your case it is known as Upper bounded wildcard.

http://docs.oracle.com/javase/tutorial/java/generics/upperBounded.html

putAll(Map<? extends K, ? extends V> map)

It means, that any object, that can extend the `A` class is applicable in this conditionn.

Problem

I have encounter a code snippt ``` putAll(Map<? extends K, ? extends V> map) ``` on the Android developer site, I know that the K and V are placeholders, but what does the question mark ? mean? Does it mean that the param must be a reference type or something else?

Original source