-2

While doing some android app development, I encounter the parameter AdapterView< ? > test. My question is what exactly does < ? > mean or do because I also see it in many other places such as a Map where it is Map< String ,? >.

Dennis Kriechel
  • 3,719
  • 14
  • 40
  • 62
Wowzer
  • 1,103
  • 2
  • 12
  • 26
  • hey thanks for answering but is it possible for you to provide me a link? – Wowzer Dec 10 '15 at 07:38
  • Ok I got it thanks but can you put your explanation in the answer on the bottom so I can mark it as answer? – Wowzer Dec 10 '15 at 07:44
  • You can get explanation here: [use this link](http://stackoverflow.com/questions/6632833/java-syntax-explanation) – User_1191 Dec 10 '15 at 08:05

1 Answers1

2

In generic code, the question mark (?), called the wildcard, represents an unknown type.

The wildcard can be used in a variety of situations: as the type of a parameter, field, or local variable; sometimes as a return type.

So in order to answer the question: it is a Wildcard-> Official Doc so you can handle classes event when you dont know the type.

ΦXocę 웃 Пepeúpa ツ
  • 47,427
  • 17
  • 69
  • 97