[QUOTE=shana07]TQ.Pretty understood List now and also I read List is an interface from a Collection.
Then, how about an ArrayList can contain other lists .....as what you said?
If you want to create many ArrayLists (they are also lists since ArrayList implements List) then just do as I posted earlier
either
or
Then add the lists at their positions with
Then, how about an ArrayList can contain other lists .....as what you said?
Originally posted by r035198x
Originally posted by r035198x
either
Code:
ArrayList<ArrayList> lists = new ArrayList<ArrayList>(); //preferrable
Code:
ArrayList lists = new ArrayList();
Code:
lists(i) = new ArrayList();
Comment