public void playerWithHighestPoints() { Collection col = allPlayers.values(); Player playerWithHighestPoints = null; for(Player temp: col) { if(playerWithHighestPoints == null || temp.getPoints() > playerWithHighestPoints.getPoints()) { playerWithHighestPoints = temp; } } System.out.println(temp.toString()); }