Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

1. Answer the following questions for the method search() below: public static i

ID: 440720 • Letter: 1

Question

1. Answer the following questions for the method search() below: public static int search (List list, Object element) // Effects: if list or element is null throw NullPointerException // else if element is in the list, return an index // of element in the list; else return -1 // for example, search ([3,3,1], 3) = either 0 or 1 // search ([1,7,5], 2) = -1 Base your answer on the following characteristic partitioning: Characteristic: Location of element in list Block 1: element is first entry in list Block 2: element is last entry in list Block 3: element is in some position other than first or last (a)

Explanation / Answer

Did you ever get the answer to this?