I\'m creating an educational game for young students who needs to learn the most common words. On random I pick three words of the list, show them on the screen, play an audio r
What about this?
private String getMinKey(Map map, String... keys) { String minKey = null; int minValue = Integer.MAX_VALUE; for(String key : keys) { int value = map.get(key); if(value < minValue) { minValue = value; minKey = key; } } return minKey; }