7.) Level 3 Given the following code in main: String[] names…
7.) Level 3 Given the following code in main: String[] names = {“Mary”, “John”, “Jill”, “MARY”, “Joe”, “MaRy”, “Chris”};String searchName = “Mary”;int count = searchArray(names, searchName);sout(“There are ” + count + ” occurrences of ” + searchName + ” found in the array.”); Write the code for the method called searchArray which: 1.) Receives 2 parameters: a.) A String array called names b.) A String called searchName 2.) Returns the number of times that the searchName occurred in the array, without regard to the case of the String in searchName.
Read Details