Quantcast
Channel: Adding an arrayList of random type to an arrayList - Stack Overflow
Browsing latest articles
Browse All 2 View Live

Answer by user253751 for Adding an arrayList of random type to an arrayList

If you want an ArrayList which contains ArrayLists with unknown contents, use the type ArrayList<ArrayList<?>> for the outer list. This code should compile with no problems:...

View Article



Adding an arrayList of random type to an arrayList

So I have looked a lot online on how to do this and what I get is this ArrayList<ArrayList<Type>> arrayLists = new ArrayList<ArrayList<Type>>(); ArrayList<TypeA> typeA =...

View Article
Browsing latest articles
Browse All 2 View Live




Latest Images