Hashmap method not accepting defined parameters
- by Ocasta Eshu
My assignment is to implement a contact list in a HashMap. All has gone well except for the problem in the code below. the HashMap method put(K key, V value) isnt accepting the defined parameters String, List.
public ContactList(){
private HashMap<String, List<String>> map;
public void update(String name, List<String> number){
this.map.put(name, number)
The error is:
The method put(String, List<String>) is undefined for the type ContactList
How do I correct this?