I want to print key who has max point .. it shows can not find symbol..what's wrong with this code??
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 String getWinner (){ String w; int v, c=0; Iterator s = players.iterator(); while (s.hasNext()){ v= s.isNext(); if(v>c){ c=v; w= s.getKey(); } } return w; } } public class Program { public static void main(String[ ] args) { Bowling game = new Bowling(); Scanner sc = new Scanner(System.in); for(int i=0;i<3;i++) { String input = sc.nextLine(); String[] values = input.split(" "); String name = values[0]; int points = Integer.parseInt(values[1]); game.addPlayer(name, points); } game.getWinner();}