Given the code fragments:
interface CourseFilter extends Predicate
public default boolean test (String str) {
return str.contains ("Java");
}
}
and
List
Predicate
Predicate cf2 = new CourseFilter() { //line n1
public boolean test (String s) {
return s.startsWith ("Java");
}
};
long c = strs.stream()
.filter(cf1)
.filter(cf2 //line n2
.count();
System.out.println(c);
What is the result?