(List<String> words)
| 23 | |
| 24 | //Use stream to find all numbers that contain the letter a |
| 25 | public static List<String> findAllWordsThatContainLetterA(List<String> words){ |
| 26 | return words.stream() |
| 27 | .filter(word -> word.contains("a")) |
| 28 | .collect(Collectors.toList()); |
| 29 | } |
| 30 | |
| 31 | //print out the origin lists, and then the changed lists |
| 32 | public static void main(String[] args) { |