Strange for-each loop java Languages

Strange for-each loop java

Could anyone tell me, why does it works?Why can I set 0 as i, but it still iterates?Because i isn't a control variable in that loop, it's just one of the values in the array. Per JLS§14.4.2, for arrays, the enhanced for loop is equivalent to this:
Read More
Java 8, compare two maps and return result Languages

Java 8, compare two maps and return result

I am comparing 2 maps using Java 8 features and based on condition wants to return the result. Using .forEach is showing compile time error and basically, the return is returning from Lambda expression and not from the loop. How can I return from the loop enclosing the lambda? Note...
Read More