Class<List> or Class<List<?>> [closed]

The second one, because the first one uses the raw type instead of generics.

i.e. List is raw, but List<?> is generic, and you shouldn’t mix-and-match between both raws and generics.

Leave a Comment