Tim Cooke wrote:This week, we're delighted to have Khalid Mughal and Vasily Strelnikov helping to answer questions about the new book OCP Oracle Certified Professional Java SE 21 Developer (Exam 1Z0-830) Java SE 17 Developer (Exam 1Z0-829) Programmer’s Guide.
My journey started a year or so before Covid, I made many trips to local computer stores, buying one or two at a time when they were on sale.Tim Holloway wrote: that you were able to obtain so many Pi Zero's! Those things were hard to get hild of even before The Great Pi shortage.
Anil Philip wrote:@Venkat Subramaniam
Can you please look at this post I made in the certification forum?
https://coderanch.com/t/775369/certification/Sybex-Ch-Lambdas-difference-compiler
per Jeanne's comment,
In location B, the lambda isn't in scope anymore so "c" doesn't produce such a conflict.
I still do not understand why the variables are in scope in 'LOCATION A', but out of scope in 'LOCATION B'.
To me, a lambda expression is something inserted that exists beyond the life of that code block.
It will be executed sometime later on, outside the life of the block.
It is like an alien visiting earth![]()
So, both locations A and B have to be taken into account.