Java: Which statement about Lambdas and Functional Interfaces is the strongest interview answer?

Difficulty:

Easy

Questions:

1

Time Limit:

2 minutes

Passing Score:

100%

Question

Which statement about Lambdas and Functional Interfaces is the strongest interview answer?

  1. Lambdas and Functional Interfaces is mostly a naming style choice and has little effect on runtime or design.
  2. Lambdas and Functional Interfaces exists mainly to reduce the number of Java files in a project.
  3. Lambdas and Functional Interfaces matters only for frontend frameworks, not for core Java applications.
  4. A lambda provides an implementation for a functional interface, which has exactly one abstract method.

Hint

Start with the core rule behind Lambdas and Functional Interfaces.

Answer and rationale

Correct answer: D. A lambda provides an implementation for a functional interface, which has exactly one abstract method.

A lambda provides an implementation for a functional interface, which has exactly one abstract method. This is the base concept interviewers commonly test first.

Track: Java