(Java)Write a function, first, that takes two parameters, anarray of Objects, array , and a single Object , item . The functionshould return the index of the first occurrence of item in array.Use the standard equals() method from Object to do the equalitycheck. If no element in array is “equal” to item then return –1.
Expert Answer
An answer will be send to you shortly. . . . .