Could someone please why do we say that the syntax of enhanced for loop (for-each) in java in streamlined.
Also, my java compiler does not compile programs containing the enhanced for loop. It gives errors like:
for(int x:collection) { }
^
; expected
Could someone suggest solutions to this?