Given:
and the code fragment:What is the result?
Given:
and the code fragment:What is the result?
D
the passed parameter name passed to forEach is wrong, if we change it to src the answer will be B
If we ignore the typo in the forEach() method, and the brackets were correct, then the answer is B
D is correct like this. If parenthesis are balanced and scr replaced with src then B is answer.
forEach((src, res) -> ...) -> D is correct
Answer is B if .forEach((src, res) -> System.out.println(src));