What, if any, is the performance difference between the following two loops?
for (Object o: objectArrayList) { o.DoSomething(); }
and <
1. for(Object o: objectArrayList){ o.DoSomthing(); } and 2. for(int i=0; i
Both does the same but for easy and safe programming use for-each, there are possibilities for error prone in 2nd way of using.