X437: Review - Count Fours

Iterate through the given array and return the number of fours.

Examples:

countFours({}) -> 0
countFours({1,4,4,4,4,4,5}) -> 5
countFours({6,4,8,4}) -> 2

Your Answer:

Reset

Practice a different Java exercise

Feedback

Your feedback will appear here when you check your answer.