Here you can find the source of getSum(int[] array)
public static int getSum(int[] array)
//package com.java2s; //License from project: Open Source License import java.util.List; public class Main { public static int getSum(int[] array) { int ges = 0; for (int value : array) ges += value;/*from w w w . ja va 2 s. co m*/ return ges; } public static int getSum(List<Integer> list) { int ges = 0; for (int value : list) ges += value; return ges; } }