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

ruby on rails - Devise Logout Error in RoR -

c# - Create a Notification Object (Email or Page) At Run Time -- Dependency Injection or Factory -

model view controller - MVC Rails Planning -