simple return coding
in
Programming Questions
•
10 months ago
Let's say
nums is an
ArrayList<Float> containing some numbers. How do I write a code that returns the sum of all the numbers in
nums.
- ArrayList<Float> nums;
- for(Float s : nums);
- return nums
Is this how it should be written to call a return as requested?
1