Can someone please explain to me how for(int current : values) works. Assuming we have a method like this. Thanks
public int count(int[] values, int value)
{
int count = 0;
for (int current : values)
{
if (current == value)
count++;
}
return count;
}