for-each
Java Цикли
for (T x : c)
Блок-схема за ДСТУ
Вихідний код
class P {
static int count(int[] a, int key) {
int c = 0;
for (int x : a) {
if (x == key) c++;
}
return c;
}
} for (T x : c)
class P {
static int count(int[] a, int key) {
int c = 0;
for (int x : a) {
if (x == key) c++;
}
return c;
}
}