Java Array Sum sum(final int[] terms, final int start, final int len)

Here you can find the source of sum(final int[] terms, final int start, final int len)

Description

sum

License

Open Source License

Declaration

static int sum(final int[] terms, final int start, final int len) 

Method Source Code

//package com.java2s;

public class Main {
    static int sum(final int[] terms, final int start, final int len) {
        int s = 0;
        final int iSz = start + len;
        for (int i = start; i < iSz; i++) {
            s += terms[i];/*from w  w  w .ja v  a2s  .  c o m*/
        }
        return s;
    }

    static int sum(final int[] terms) {
        return sum(terms, 0, terms.length);
    }
}

Related

  1. sum(final double[] productMix)
  2. sum(final double[] target)
  3. sum(final double[] vec)
  4. sum(final float[] x)
  5. sum(final int base, final int[] ints)
  6. sum(final int[] values)
  7. sum(final int[] values, final int... indice)
  8. sum(final long... values)
  9. sum(float[] a, int off, int length)