Hi,
I have an address book application and Im creating the functionality to delete an address entry.
The application saves the entries to a file on my hard drive through java persistence.
Everything is working fine but the delete function.
After i choose the delete option in the command-line gui it asks for the name of the person who's entry I want to delete just like I want it to but I after I enter the name of the person,It doesnt do so and instead brings back the previous menu.
the delete address entry method is shown below;
Code:public void deleteAddressBookEntry(AddressBookEntry addressBookEntry)
{
String nameWithUnderscores =
replaceSpacesWithUnderScores(addressBookEntry.getName());
File fileToDelete =
new File(addressBookDirectory, nameWithUnderscores);
if (fileToDelete.exists()) {
fileToDelete.delete();
}
}
