I have a HashMap
defined like this...
HashMap uniqueNames = new HashMap();
It stor
If you have to use a HashMap, then the simplest way is probabably just to loop through the Map looking for the maximum
Entry maxEntry = null;
for(Entry entry : uniqueNames.entrySet()) {
if (maxEntry == null || entry.getValue() > maxEntry.getValue()) {
maxEntry = entry;
}
}
// maxEntry should now contain the maximum,