Question: 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 anjava

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 -1

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

To solve this problem you need to write a Java method that will return the index of the first occurr... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!