0
/ 10
Write the method int addAllPositives(int[] nums) in Java that returns the sum of all elements in the array nums that are positive.
Write the method int addAllPositives(int[] nums)
in Java that returns the sum of all elements in the array nums
that are positive.
Examples:
addAllPositives({51,9,10}) -> 70
addAllPositives({51,9,-10}) -> 60
addAllPositives({-51,-9,-10}) -> 0
Your feedback will appear here when you check your answer.