I have an assignment, This is my HashMap initialization.. I can only use standard JAVA API.
private static HashMap<String, HashSet<String>> hMap = new HashMap<String, HashSet<String>>();
Is it possible to get the Key of a specified value say getkey(hMap,”today”) and it would return the key where today is located..
Aslo is there a way to get the last value of a Key in my HashSet?
Any help is appreciated thanks!
But actually you can have more than one keys which has “today”. So I return List.toString with keys