Which code fragment, when inserted at line n1, sorts the employees list in descending order of fName and then ascending order of lName?

Given:


Which code fragment, when inserted at line n1, sorts the employees list in descending order of fName and then ascending order of lName?
A. .sorted (Comparator.comparing(Emp::getfName).reserved().thenComparing(Emp::getlName))
B. .sorted (Comparator.comparing(Emp::getfName).thenComparing(Emp::getlName))
C. .map(Emp::getfName).sorted(Comparator.reserveOrder())
D. .map(Emp::getfName).sorted(Comparator.reserveOrder().map(Emp::getlName).reserved

Download Printable PDF. VALID exam to help you PASS.

5 thoughts on “Which code fragment, when inserted at line n1, sorts the employees list in descending order of fName and then ascending order of lName?

Leave a Reply

Your email address will not be published. Required fields are marked *


The reCAPTCHA verification period has expired. Please reload the page.