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

javascript - Chart.js (Radar Chart) different scaleLineColor for each scaleLine -

apache - Error with PHP mail(): Multiple or malformed newlines found in additional_header -

android - Go back to previous fragment -