can anyone please specify to me what are the advantages of Enhanced for loop and Iterators in java +5 ?
For me, it's clear, the main advantage is readability.
for(Integer i : list){ .... }
is clearly better than something like
for(int i=0; i < list.size(); ++i){ .... }