What is the output of this code?

Last Updated :
Discuss
Comments

What is the output of this code?

Java
List<String> names = Arrays.asList("Asish", "Geek", "Amiya");
names.stream().filter(s -> s.startsWith("A")).count();


3

2

1

Compilation error

Share your thoughts in the comments