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.
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.