Java SE 8 Programmer II — Question 189

Which statement is true about the single abstract method of the java.util.function.Predicate interface?

Answer options

Correct answer: B

Explanation

The correct answer is B because the single abstract method in the Predicate interface is designed to accept one argument and return a boolean value indicating the evaluation result. Option A is incorrect as it states that the method returns void, which is not true. Options C and D misrepresent the return type of the method, which specifically returns a boolean and not a result of the same type as the argument or any data type.