I'm studying Java at the moment and as a total beginner I have no idea what the last bit of the code is about. If someone can please explain how "count" ties in, and how it ties in with the "if" statement. As far as learning goes, I'm making a lot of assumptions to basically assume I'm on the right path until I read a bit that clarifies it. Thus far no explanation has been given for the specific part in the function, please help.
int count = 0;
int day;
for (day = 0; day < 365; day++) {
if (used[day] == true)
count++;
}
System.out.println(count);
So my question would be, does the if statement relate to count, as its after that 'condition' does count become the variable placeholder for the condition of 'if'?