Storing and Retrieving ArrayList values from hashmap

后端 未结 7 2525
感动是毒
感动是毒 2020-12-13 13:27

I have a hashmap of the following type

HashMap> map=new HashMap>();    
<         


        
7条回答
  •  抹茶落季
    2020-12-13 13:44

    for (Map.Entry> entry : map.entrySet()) {
     System.out.println( entry.getKey());     
     System.out.println( entry.getValue());//Returns the list of values
    }
    

提交回复
热议问题