X623: Count negative values in array

Description

Complete the function countNegatives() so that it counts of negative values in the array numbers. You may assume that the array has some elements.

Examples:

countNegatives({1,2,3}) -> 0
countNegatives({4,-5}) -> 1

Your Answer:

Reset

Practice a different Java exercise

Feedback

Your feedback will appear here when you check your answer.