Hello I have just start learning spring and something is not clear to me at the beggining of the http://www.springbyexample.org/ book.
On this line "count = hVotes.get(candidate);" I get error. "get" method receive int and I try to pass candidate object, but there is no code in the book for candidate so I don't know what to do here? What am I doing wrong?Code:public void record(Candidate candidate){ int count = 0; if (!hVotes.containsKey(candidate)){ hVotes.put(candidate, count); } else{ count = hVotes.get(candidate); } }
Thanks


Reply With Quote
