1Z0-809 Web TestEngine demo

Exit VCEDump 1Z0-809 Java SE 8 Programmer II
Question 14 of 32
0% complete
Q14 Single choice

Given the code fragments:

interface CourseFilter extends Predicate<String> {

public default boolean test (String str) {
return str.equals ("Java");
}
}

and

List<String> strs = Arrays.asList("Java", "Java EE", "Java ME");
Predicate<String> cf1 = s - > s.length() > 3;
Predicate cf2 = new CourseFilter() { //line n1
public boolean test (String s) {
return s.contains ("Java");
}
};
long c = strs.stream()
.filter(cf1)
.filter(cf2 //line n2
.count();
System.out.println(c);

What is the result?

Sign in to mark questions

Sign in to save marked questions and return to this demo.

Sign in