What's wrong with my code apart from main function
import java.util.*; public class Bowling { HashMap<String, Integer> players; Bowling() { players = new HashMap<String, Integer>(); } public void addPlayer(String name, int p) { players.put(name, p); } public void getWinner(){ HashMap<String, Integer> hm = new HashMap<String, Integer>(); Map.Entry<String, Integer> entryWithMaxValue = null; for (Map.Entry<String, Integer> currentEntry : hm.entrySet()) { if (entryWithMaxValue == null || currentEntry.getValue().compareTo(entryWithMaxValue.getValue()) > 0) { entryWithMaxValue = currentEntry; } } System.out.println(entryWithMaxValue.getKey()); } }