list item foreach loop get size in android code example

Example 1: android foreach

for (Object object : aList) {
    // do something with object
}

Example 2: android foreach loop

for (Iterator i = map.values().iterator(); i.hasNext(); ) {
    Object object = i.next();
    // do something with object
}
                    
                
                

Tags:

Misc Example