Oracle Java SE 8 Programmer II 1z0-809 Question # 62 Topic 7 Discussion

Oracle Java SE 8 Programmer II 1z0-809 Question # 62 Topic 7 Discussion

1z0-809 Exam Topic 7 Question 62 Discussion:
Question #: 62
Topic #: 7

Given the code fragments:

1z0-809 Question 62

and

1z0-809 Question 62

Which two modifications enable to sort the elements of the emps list? (Choose two.)


A.

Replace line n1 withclass Person extends Comparator


B.

At line n2 insertpublic int compareTo (Person p) {return this.name.compareTo (p.name);}


C.

Replace line n1 withclass Person implements Comparable


D.

At line n2 insertpublic int compare (Person p1, Person p2) {return p1.name.compareTo (p2.name);}


E.

At line n2 insert:public int compareTo (Person p, Person p2) {return p1.name.compareTo (p2.name);}


F.

Replace line n1 withclass Person implements Comparator


Get Premium 1z0-809 Questions

Contribute your Thoughts:


Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.