Can some one explains what is difference between those two? From what I researched:
List<List<? extends Object>>:
we can read any type of object String, Object or any thing else driven from Object class but we can not write to it
List<List<Object>>:
We read and write different type of object which are subclass of Object to it.
To me List<List<Object>>
is more useful, what is the use List<List<? extends Object>>
over List<List<Object>>
?
> Having a list of raw objects won't give you the benefit of static type checking.
– Dylon Dec 17 '19 at 22:15