Given: (Exhibit) You want the code to produce this output: John Joe Jane Which code fragment should be
Given:You want the code to produce this output:JohnJoeJaneWhich code fragment should be inserted on line 1 and line 2 to produce the output? A. Insert Comparable<Person> on line 1.Insertpublic int compare(Person p1, Person p2) {return p1.name.compare(p2.name);}on line 2. B. Insert Comparator<Person> on line 1.Insertpublic int compare(Person person) {return person.name.compare(this.name);}on line 2. C. Insert Comparator<Person> on line 1.Insertpublic int… Read More »