"? private final Class activityClass; I understand the definition, exce...">

Is there any special meaning to the text "<?>"?

private final Class<? extends FragmentActivity> activityClass; 

I understand the definition, except for the <? > <? > .

Is there any reason for the extensions to be enclosed in this special text?

+4
source share
2 answers

which is a wild card symbol that says any of them can take any type that extends FragmentActivity

+7
source

This is part of Java generics , and this means that the activityClass type extends FragmentActivity.

0
source

Source: https://habr.com/ru/post/1484298/


All Articles