Answer the question
In order to leave comments, you need to log in
`
ArrayList elements as Map key?
There is an ArrayList < `Character > list, there is a HashMap<Character, Integer> map
Why does the compiler in map.put(list[i], 0) swear at list[i] in the loop? At the same time, if you convert to an array char[ ] arrayChar = list.toArray(), then map.put(arrayChar[i], 0) does not cause problems.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question