About Question enthuware.ocajp.i.v8.2.1468 :
Posted: Fri Oct 11, 2019 3:52 am
Java Certification Resources and Java Discussion Forum
https://enthuware.com/forum/
I believe this should be (changes in bold):Observe that without the brackets over a, b, it would imply that you are trying to pass 3 arguments to processList method - a, b, and b->System.out.println(a*b), which is incorrect. You actually want to pass only two arguments - a and the lambda expression. Therefore, whenever the method of a functional interface takes more than one parameter, you need to put the arguments within brackets.
Observe that without the brackets over a, b, it would imply that you are trying to pass 3 arguments to processList method - al, a, and b->System.out.println(a*b), which is incorrect. You actually want to pass only two arguments - al and the lambda expression. Therefore, whenever the method of a functional interface takes more than one parameter, you need to put the arguments within brackets.