protected int getVoteWinner()
{
int old = 0;
HashMap<Integer, Integer> temp = new HashMap<>();
for (int vote : votes.values())
{
if (!temp.containsKey(vote))
temp.put(vote, 1);
else
{
old = temp.get(vote);
old++;
temp.getEntry(vote).setValue(old);
}
}
int max = temp.head().getNext().getValue();
int result = temp.head().getNext().getKey();
for (Map.Entry<Integer, Integer> entry : temp.entrySet())
{
if (entry.getValue() > max)
{
max = entry.getValue();
result = entry.getKey();
}
}
votes.clear();
temp = null;
return result;
}
How do I solve this problem? Use aCis 350, replaces FastMap with HashMap and is giving this error.
Updated
Takao NPC [Interlude] Preview Album
Tarti NPC [Interlude] Preview Album
Tears NPC With Effect and Sound [Interlude] Preview Album
Temples Npcs V2 [Interlude] Preview Album
Troll [Interlude] Preview Album
Question
L2shaken
http://imgur.com/a/KJwdY
How do I solve this problem? Use aCis 350, replaces FastMap with HashMap and is giving this error.
Edited by L2shakenLink to comment
Share on other sites
17 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.