java for each in this code example
Example 1: java for each
//itemset contains variables of type <Data Type>
for(<Data Type> item : itemset) {
//loop
}
Example 2: for each en vjava
String array[] = {"Avila", "Burgos", "León", "Palencia", "Salamanca", "Segovia", "Soria", "Valladolid", "Zamora"};
for (String elemento: array)
System.out.println(elemento);