java - How can I declare HashMap<String, ArrayList<ArrayList<String>>>? -


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

Popular posts from this blog

java - Checkbox item adds to spinner -

C# MVC AngularJS -

How to debug "expected android.widget.TextView but found java.lang.string" in Android? -