Java, Programming, Development.
fruits.stream() .filter(fruit -> fruit.startsWith("A")) .map(String::toUpperCase) .toList(); System.out.println(result); // Output: [APPLE] } } In this code, we create a list of fruits and then use a stream to filter and transform it. We filter for fruits starting with ‘A’ and convert the result to