hi all,
i went to the link where explanation is given for using such kind of for syntax, there its also said,
"The for statement also has another form designed for iteration through Collections and arrays"
i'm not able to figure out how the loop will be used in case os collections for iteration, because normally wht we do is smthng like this
Iterator itr = list.iterator();
while(itr.hasNext()){
itr.next()
------
-----
}
any code snippet about the new "for" syntax for using with collections
and why it should be preferred over current way of iteration.
thanks in advance.