Answered step by step
Verified Expert Solution
Question
1 Approved Answer
java Write a method to find if a name is on an array of Strings. Your method will search the array and return the index
java
Write a method to find if a name is on an array of Strings. Your method will search the array and return the index of the first occurrence of the name. If the name is not on the list, the method should return -1. The method signature must be: public static int findName(Stringl], String) There is no I/O for this question. All tests are unit tests. If the first test is not passing all other tests will fail. Make sure you have the method's header correct before proceeding. Example: Method's return Names Array "Athur","John","Clark"} "Athur","John","Clark"} Name to find Clark Joe -1Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started