Exam 1z0-809 All QuestionsBrowse all questions from this exam
Question 131

Given:

Which two interfaces can you use to create lambda expressions? (Choose two.)

    Correct Answer: C, E

    To use an interface for creating lambda expressions, the interface must be a functional interface. A functional interface is an interface that has exactly one abstract method. In the provided code, interface P has one abstract method (method1()), making it a functional interface. Interface Q extends P but doesn't add any abstract methods, so it still has only one abstract method, making it a functional interface as well. Therefore, P and Q can be used to create lambda expressions.

Discussion
JME_CHGOptions: CE

C, E actually

shivkumarxOptions: CE

CE is correct, D is wrong as S has no abstract methods to be implemented

steefaandOptions: CE

C and E are correct.

WilsonKKerllOptions: CE

Answer is C & E.

OhayouOptions: CE

Answer : C, E