I'm having some trouble with exercise 94. All parts of the exercise pass except the last part (searching the phone book for a number given a name as a search parameter). The link to my work is here:
TMC pastebin of Exercise 94
The method that I'm having a problem with is public
String searchNumber(String search)
in the Phonebook class
.
The if(statement) won't accurately search for items in the string. Search for "pe" or "kk" should return true when reading "Pekka Mikkola", but it returns false. Also, return won't print to console.
I hope the //comments are enough to explain my process. What am I missing?
Any unrelated critiques are also welcome. I'm new to this and would gladly take some constructive criticism.
Thank you for your help.