0
/ 10
Write the method int addAfterNegative(int[] nums) in Java that returns the sum of the elements in the array nums after the first negative...
Write the method int addAfterNegative(int[] nums)
in Java that returns the sum of the elements in the array nums
after the first negative number.
Examples:
addAfterNegative({-51,9,10}) -> 19
addAfterNegative({51,-9,10}) -> 10
addAfterNegative({-51,-9,-10}) -> -19
addAfterNegative({51,9,10}) -> 0
Your feedback will appear here when you check your answer.