Reputation: 73
It is possible to have sub elements in an arraylist position like the one shown in the picture below?
Upvotes: 1
Views: 86
Reputation: 1226
An ArrayList of Arrays or ArrayLists?
ArrayList<Object[]> arrays = new ArrayList<>();
arrays.add(new Object[3]);
ArrayList<ArrayList> arrays = new ArrayList<>();
arrays.add(new ArrayList());
Upvotes: 1