void main() {
    int[] numbers = {64, 25, 12, 22, 11};
    int[] ascending = Arrays.copyOf(numbers, numbers.length);
    Arrays.sort(ascending);
    IO.println(Arrays.toString(ascending));

    ArrayList<Integer> descending = new ArrayList<>(List.of(64, 25, 12, 22, 11));
    Collections.sort(descending);
    Collections.reverse(descending);
    IO.println(descending);

    ArrayList<String> words = new ArrayList<>(List.of("banana", "Apple", "cherry"));
    words.sort(Comparator.comparing(s -> s.toLowerCase()));
    IO.println(words);
}

// From Groundwork, chapter 11 (ch11-searching-and-sorting), box 7.
// This example is from Groundwork, licensed CC BY-NC-SA 4.0.
// Run with: java ch11_07.java
