java - create 2d list of sets -



java - create 2d list of sets -

this question has reply here:

cannot instantiate type set 3 answers

i trying 2d grid/array each cell set. purpose utilize next code example

list<set<integer>> grid = new arraylist<set<integer>>(); // in line set underlined error grid.add(new set<integer>()); grid.get(0).add(2);

but says - "cannot instantiate type set". want instantiate new list dimension , each of dimension cells should sets? , comes question how iterate efficiently through grid?

set interface, neeed instanciate specific implementation of set, illustration hashset.

java arrays collections interface set

Comments

Popular posts from this blog

php - Android app custom user registration and login with cookie using facebook sdk -

django - Access session in user model .save() -

php - .htaccess Multiple Rewrite Rules / Prioritizing -