gudii9
asked on
array sum
Hi,
I am workjing on below challenge
http://codingbat.com/prob/p175763
i wrote as below and passed all tests.
i wonder how to improve my code. please advise
I am workjing on below challenge
http://codingbat.com/prob/p175763
i wrote as below and passed all tests.
public int sum3(int[] nums) {
int num1=nums[0];
int num2=nums[1];
int num3=nums[2];
return num1+num2+num3;
}
i wonder how to improve my code. please advise
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
correction - that should say what HE provided.