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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!