Question: Which of the following is not a valid lambda expression? A. (Integer j, k) -> 5 B. (p,q) -> p+q C. (Integer x, Integer y)

Which of the following is not a valid lambda expression? 

A. (Integer j, k) -> 5

B. (p,q) -> p+q

C. (Integer x, Integer y) -> x*y

D. (left,right) -> {return "null";}

E. All of these are valid.

Step by Step Solution

3.56 Rating (160 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

The correct answer is A The lambda expression A Integer j k 5 is not valid In Java if we ... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Oracle Questions!