Write a method countNegatives that uses stream operations to count how many numbers in a given array

Question:

Write a method countNegatives that uses stream operations to count how many numbers in a given array of integers are negative. For example, if the array is {5, -1, -3, 20, 47, -10, -8, -4, 0, -6, -6}, return 7.

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question
Question Posted: