M

Mr. Dubey • 100.28K Points
Coach

Q. In lambda expression `(a, b) -> a + b`, what is required of 'a' and 'b'?

  • (A) Both must be final
  • (B) Both must be of the same type
  • (C) Both must be numbers
  • (D) Both must be parameters of the same functional interface method
  • Correct Answer - Option(D)
  • Views: 5
  • Filed under category JAVA

Explanation by: Mr. Dubey
The parameters must match the functional interface method signature.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.


Question analytics