Phonebook implemented in java