0 votes
in JAVA by

 Which of the following is correct about Java 8 lambda expression?

A. Optional parenthesis around parameter – There is no need to declare a single parameter in parenthesis. For multiple parameters, parentheses are required.

       B. Optional type declaration – There is no need to declare the type of a parameter. The compiler can infer the same from the value of the parameter.

       C. Both the options

       D. None of the options

1 Answer

0 votes
by

Correct answer is Both the options

A. Optional parenthesis around parameter – There is no need to declare a single parameter in parenthesis. For multiple parameters, parentheses are required.

B. Optional type declaration – There is no need to declare the type of a parameter. The compiler can infer the same from the value of the parameter.

Related questions

0 votes
asked Apr 13, 2023 in JAVA by Robin
0 votes
asked May 22, 2022 in JAVA by AdilsonLima
...