Question 105 of 130 from exam 1Z0-809: Java SE 8 Programmer II

Question 105 of 130 from exam 1Z0-809: Java SE 8 Programmer II

Question

Given:

public interface Lengthvalidator {
public boolean checkLength(String str);

}
public class Txt {
public static void main(String[] args) {
boolean res = new Lengthvalidator() {
public boolean checkLength (String str) {
return str.length() > 5 && str.length() < 10

}
}.checkLength ("Hello");

Which interface from the java.util.function package should you use to refactor the class Txt?

Answers

Explanations

Click on the arrows to vote for the correct answer

A. B. C. D.

C.

https://docs.oracle.com/javase/8/docs/api/java/util/function/package-summary.html