Here you can find the source of sumUpArray(int[] array)
public static int sumUpArray(int[] array)
//package com.java2s; /**//w w w .j av a 2 s .c om * Title: efa - elektronisches Fahrtenbuch f?r Ruderer * Copyright: Copyright (c) 2001-2011 by Nicolas Michael * Website: http://efa.nmichael.de/ * License: GNU General Public License v2 * * @author Nicolas Michael * @version 2 */ public class Main { public static int sumUpArray(int[] array) { if (array == null) { return 0; } int sum = 0; for (int element : array) { sum += element; } return sum; } }