Java Medium 1
š§ Code Challenge
public class Main {
public static void main(String[] args) {
int[] scores = {85, 42, 77, 90, 60};
for (int score : scores) {
checkPass(score);
}
}
public static void checkPass(int score) {
if (score >= 60) {
System.out.println("Score " + score + ": Pass");
} else {
System.out.println("Score " + score + ": Fail");
}
}
}
Explain what this function does. Speak clearly and use keywords.