Famous programmers

Report a typo

Given a list of famous programmers:

List<String> famousProgrammers = Arrays.asList(
        "Linus Torvalds",
        "John Carmack",
        "James Gosling",
        "Joshua Bloch",
        "Ken Thompson"
);

The following code counts something using streams:

long result = famousProgrammers.stream()
        .filter(name -> name.startsWith("J"))
        .count();

The result is ...

Select one option from the list
___

Create a free account to access the full topic