Question: How can I do this two question? Question 9 1 pts Which of the following statements correctly provides a comparator function using lambda expressions to


How can I do this two question?
Question 9 1 pts Which of the following statements correctly provides a comparator function using lambda expressions to sort an array of countries by population, assuming the existence of a getPopulation method? Arrays.sort(countries, (c1, c2) - c1.getPopulationO- c2.getPopulationO); Arrays.sort (countries, compare(ci -> c1.getPopulationO, c2- c2.getPopulation()) :J Arrays.sortCcountries,c -c.getPopulationD Arrays.sort(countries, comparator(c - c.getPopulationo)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
