谁能向我解释这段代码?
class className {
int[] coeffs;
int count(int value) {
int count = 0;
for (int coeff: coeffs)
if (coeff == value)
count++;
return count;
}
}
我真正不明白的是这部分:
for (int coeff: coeffs)
这是什么意思?感谢帮助。