A

Admin • 825.56K Points
Coach

Q. Which of the following is a valid lambda expression that accepts two integers and returns their sum?

  • (A) (int a, int b) -> a + b
  • (B) (a, b) => a + b
  • (C) a, b -> a + b
  • (D) (a, b): a + b

Explanation by: Admin
`(int a, int b) -> a + b` is valid syntax for summing two integers.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.