Java, Lambda Expressions, Functional Programming, Programming, Software Development.
filteredList = new ArrayList<>(); for (String str : list) { if (str.startsWith("J")) { filteredList.add(str.toUpperCase()); } } With Java 8 Stream API and Lambda Expressions List<String> filteredList = list.stream() .filter(str -> str.startsWith("J")) .map(String::toUpperCase)