Java SE 8 Programmer II — Question 30

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

Answer options

Correct answer: C

Explanation

The correct answer is C because the java.util.function.Function interface's abstract method is designed to take one argument and produce a result of the same type as that argument. Option A is incorrect because it states that the method returns a boolean, which is not true. Option B is incomplete, and option D is incorrect as it suggests the method can return any data type, which goes against the type consistency of the Function interface.