Names

Report a typo

Suppose you have the following list:

List<String> names = List.of("Patrick Ross", "Kelly Wood", "James Moore", "Janice Coleman", "Mary Carter");

What is the result of the following invocation?

names.stream()
        .filter(name -> name.length() < 12)
        .filter(name -> name.startsWith("J"))
        .count();
Enter a number
___

Create a free account to access the full topic