Challenge for Maps
Create a Phonebook program that lets you quickly add and lookup names and numbers (both Strings).
The phonebook should implement the following two methods:
void putNumber(String name, String number)-Adds an entry to the phonebook.
String getNumber(String name)- Returns the phone number of a given name or
nullif the name is not present.
The boilerplate below includes the sample data that will be added and printed from the phonebook.
Alternatively, you can try out Learneroo before signing up.