Implement a method that takes a List<String> and sorts it in reverse lexicographic order. You don't need to read or write anything from or to the console, just implement the method.
Comparator
Reverse sorting
Report a typo
Sample Input 1:
apple grape pear banana pineappleSample Output 1:
pineapple pear grape banana appleSample Input 2:
Cap cape cup cake CookSample Output 2:
cup cape cake Cook CapWrite a program in Java 17
import java.util.List;
class Utils {
public static void sortStrings(List<String> strings) {
// your code here
}
}
___
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.
Create a free account to access the full topic
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.