+1 (845) 317-8489 [email protected]

Learning Goal: I’m working on a computer science question and need the explanation and answer to help me learn.

Write the definition of a countPos that receives a to a Scanner associated with a stream of input consisting of only. The reads all the remaining to be read in standard input and returns the number that are positive. So if the input were:

19 -5 -3 -251 14
-7 -14 6
the would return 3 because there are 3 positive there.

The must not use a loop of any kind (for, while, do-while) to accomplish its job.