i need to make an array of arraylists of an object.
i have tried two ways , but i can't access object's properties from the array elements.
i've tried :
ArrayList<Word>[] SubList = (ArrayList<Word>[])new ArrayList(MainList.size());
AND :
ArrayList<Word>[] SubList= new ArrayList[MainList.size()];
AND:
ArrayList<Word>[] SubList= (ArrayList<Word> [])new ArrayList[MainList.size()];
What i would like to do is to call a method from the object inside the array
like this :
SubList[0].get(0).method();
Thanks In Advance