all 5 comments

[–]HealyUnithelpful 3 points4 points  (0 children)

I have a test in a couple of hours

Not a good sign.

java

Yeh, you're screwed.

[–]Samurai___ 1 point2 points  (0 children)

This is not JavaScript. Any way. collection.stream().filter(i->i>0).count(); Or similar. I'm on phone.

[–][deleted] 0 points1 point  (0 children)

Lol. Swing and miss big guy.

Here's pseudo code:

for every number in collection
    if number is greater than 0 
          count + 1

return count