Here you can find the source of summarizeIntegerArray(int[] numbers)
Parameter | Description |
---|---|
numbers | an array of integers |
public static int summarizeIntegerArray(int[] numbers)
//package com.java2s; //License from project: Creative Commons License public class Main { /**//from w w w . ja v a2s. co m * Takes an array of integers and return the summation * @param numbers an array of integers * @return a summation of the given array */ public static int summarizeIntegerArray(int[] numbers) { int total = 0; for (int number : numbers) { total += number; } return total; } }