Because your knowledge so sucks. You try to calling from a map the value as object, not like the variable.
protected int getVoteWinner()
{
final HashMap<Integer, Integer> temp = new HashMap<>();
for (int vote : votes.values())
{
if (!temp.containsKey(vote))
temp.put(vote, 1);
int old = temp.get(vote);
temp.put(vote, ++old); // If a record with this "vode" exists in Map then she will be rewrited with new value from "old" variable.
}
int max = 0;
int result = 0;
for (Map.Entry<Integer, Integer> entry : temp.entrySet())
{
if (entry.getValue() > max)
{
max = entry.getValue();
result = entry.getKey();
}
}
return result;
}