문제

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

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top