Hello,
I have a code with me, you can try it, here it is
Code:
void tmap(){
/ / ierator on the map
Iterator <Map.Entry<Couple <String> List>> i = map.entrySet().ierator();
while (i.hasNext()){
Map.Entry<Couple <String> List> peer = i.next();
/ / get the key
Couple couple = peers.getKey();
/ / displays the full name associated wih the pair
System.out.print(couple.getName() + " " + Couple.getpara() + " : ");
/ / get value
List list = <String> peers.getValue();
/ / display each iem in the list
for(int i =0; I <list.size(); I + +)
System.out.print(list.get(i) + " ");
System.out.System.out.println("");
}
}
Bookmarks