Question 129 of 130 from exam 1Z0-809: Java SE 8 Programmer II

Question 129 of 130 from exam 1Z0-809: Java SE 8 Programmer II

Question

Given the code fragments:

class Person // line ni
{

String name;
Person (Btring name) {

this.name = name;
}
// line n2
List<Person> emps = new ArrayList<>();
7/* code that adds objects of the Person class to the emps list goes here */
Collections. sort (emps);

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

Answers

Explanations

Click on the arrows to vote for the correct answer

A. B. C. D. E. F.

BC.