java - How can I declare HashMap<String, ArrayList<ArrayList<String>>>? -
this question has answer here:
i declare hashmap; string key , arraylist of arraylist of string value.
public map<string,arraylist<arraylist<string>>> idpathmap = new hashmap<string,arraylist<arraylist<string>>>();
but show error:the type hashmap not generic; cannot parameterized arguments <string, arraylist<arraylist<string>>>
how can declare type of hashmap?
but show error:the type hashmap not generic; cannot parameterized arguments >>
you have created own class named hashmap
. rename class (it masks java.util.hashmap
, if have imported it). or,
public map<string,arraylist<arraylist<string>>> idpathmap = new java.util.hashmap<string,arraylist<arraylist<string>>>();
or on java 8+
public map<string,arraylist<arraylist<string>>> idpathmap = new java.util.hashmap<>();
Comments
Post a Comment