Question: Write a method called sum3 that receives an an array nums of integers length 3, and returns the sum of all the elements. (Using Java
Write a method called sum3 that receives an an array nums of integers length 3, and returns the sum of all the elements. (Using Java coding)
Sample Output:
sum3([1, 2, 3]) 6 sum3([5, 11, 2]) 18 sum3([7, 0, 0]) 7
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
