Pergunta

I know this is a very basic question, but I haven't been able to find a way to word it to find the answer either here or through Google.

In the following code:

    public void onItemClick(AdapterView<?> parent, View view, int position, long id)

What does the <'?> mean for the adapter view class template? My guess is that it means the parameter can be an AdapterView holding any type, but I'm not sure and figured I'd ask the community.

Thanks

Foi útil?

Solução

You are correct. The parent parameter can be an AdapterView that is an AdapterView for any other object type.

If you want to learn more, check out info on Generics.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top