Java Array Sum sum(int[] arr)

Here you can find the source of sum(int[] arr)

Description

sum

License

Apache License

Declaration

private static int sum(int[] arr) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

public class Main {
    private static int sum(int[] arr) {
        int num = 0;
        for (int i = 0; i < arr.length; i++) {
            num += arr[i];/*w w  w  .  j av a  2s .c  o  m*/
        }
        return num;
    }
}

Related

  1. sum(int[] a)
  2. sum(int[] a)
  3. sum(int[] a)
  4. sum(int[] add)
  5. sum(int[] arr)
  6. sum(int[] arr)
  7. sum(int[] arr)
  8. sum(int[] array)
  9. sum(int[] array)