Description
Your program must define and call the following method. The return value of getPhoneNumber is the phone number associated with the specific contact name.
public static String getPhoneNumber(String[] nameArr, String[] phoneNumberArr, String contactName, int arraySize)
Hint: Use two arrays: One for the string names, and the other for the string phone numbers. Please note that the input has commas. You would need to deal with the comma using indexOf and substring.
Example code snippet:
int comma = userInput.indexOf(“,”);
contactNames[i] = userInput.substring(0, comma);
contactNumbers[i] = userInput.substring(comma + 1);
Felicia Schoenthal –
Follows the required notes. Right on time. Amazing solution.
Chris Sims –
Excellent, thank you! Got solution extremely fast, within minutes.
Ed Selee –
Great Work In Timely Fashion. Something what I wanted.
David Leedberg –
It was amazing work and in a very short time.