Question: 1- / 2 Write code for the following method in Java: 3 4 Given a list of Strings, and a name that we are looking

 1- / 2 Write code for the following method in Java:

1- / 2 Write code for the following method in Java: 3 4 Given a list of Strings, and a name that we are looking for, the method 5 find should return the first position of that name in the list. For example, if the list is [ "Tom", "Jerry", "Spike", "Tyke, Tyke ], and we are looking for "Tyke", the method should return 3. If the name is not found in the list, the method should return -1. 7 10 11 12 public static int find(String[] names, String name) {

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock 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!