0

Why list1 is valid way of instantiation but not list2?

List<List<T>> list1 = new ArrayList<List<T>>();
List<List<T>> list2 = new ArrayList<ArrayList<T>>();

I want to create a list of type list i.e.

new ArrayList<ArrayList<T>>();
Mohammed
  • 637
  • 13
  • 26

0 Answers0