java - How to create array of ArrayLists -


this question has answer here:

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

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

thorough guide for profiling racket code -