Sobes.tech
Intern — Middle

Filtering, converting to uppercase, and sorting strings

livecode

Task condition

Given an array of strings. The task is to perform the following data processing steps:

  • filtering: select only elements that start with the character "c" (case-sensitive);
  • transformation: convert the selected strings to uppercase;
  • sorting: sort the resulting strings lexicographically;
  • output: print each element of the final collection to the console.
List<String> values = Arrays.asList("a1", "a2", "b1", "c2", "c1");