java - How to create array of ArrayLists -
this question has answer here:
- create array of arraylists 15 answers
- how create integer arraylist? [duplicate] 5 answers
for program need create array of arraylists.
is possible?
this code trying use:
public static arraylist<chemical> [] [] chemicals; chemicals = new arraylist<chemical>[cols][rows];
it gives generic array creation error.
thank you.
this seems work in java 8
arraylist<chemical>[][] chemicals = new arraylist[cols][rows];
Comments
Post a Comment