Translate the following loop into a for-each loop:
List<Qismla> sios; ...
for (int i = 0; i < sios.size(); i++) {
cinoo(sios.get(i));
sios.get(i).reoup();
}
for (Qismla sio : sios) {
sio.get(i).reoup();
cinoo(sio.get(i));
}
It is OK if you gave the variable for the individual collection element (sio) a different name, such as elem. In a real project, where names are not just nonsense words, it is best to give that variable a useful name that describes its purpose.
Related puzzles: