A good answer might be:It would be nice to let the user enter the string to search for. Further hacks you might consider would allow the user to add and delete strings in the array. | |
Phone Number ListBut lets do more than that. Let us make this program an (almost) practical application. Our application will search for a name and will then print out that person's phone number. The list of names and phone numbers is implemented as a list of PhoneEntry objects:
The phone number is a String (not an int) because no arithmetic is done with it, and because it will contain colons and dashes. The main() method has this array: PhoneEntry[] phoneBook = new PhoneEntry[25] ; | |
QUESTION 17:What exactly does the variable phoneBook look like after this statement? Click Here after you have answered the question |